-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
66 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
<?php | ||
|
||
use Jaxon\Response\Response; | ||
use function Jaxon\jaxon; | ||
|
||
class ClassA | ||
{ | ||
public function methodAa(): Response | ||
public function methodAa() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->html('div', 'This is the div content!!'); | ||
return $xResponse; | ||
} | ||
|
||
public function methodAb(): Response | ||
public function methodAb() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->html('div', 'This is the div content!!'); | ||
return $xResponse; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
<?php | ||
|
||
use Jaxon\Response\Response; | ||
use function Jaxon\jaxon; | ||
|
||
class ClassB | ||
{ | ||
public function methodBa(): Response | ||
public function methodBa() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->html('div', 'This is the div content!!'); | ||
return $xResponse; | ||
} | ||
|
||
public function methodBb(): Response | ||
public function methodBb() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->html('div', 'This is the div content!!'); | ||
return $xResponse; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
<?php | ||
|
||
use Jaxon\Response\Response; | ||
use function Jaxon\jaxon; | ||
|
||
class ClassD | ||
{ | ||
public function methodDa(): Response | ||
public function methodDa() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->html('div', 'This is the div content!!'); | ||
return $xResponse; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
<?php | ||
|
||
use Jaxon\Response\Response; | ||
use function Jaxon\jaxon; | ||
|
||
function my_first_function(): Response | ||
function my_first_function() | ||
{ | ||
$xResponse = jaxon()->getResponse(); | ||
$xResponse->alert('This is a response!!'); | ||
return $xResponse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
<?php | ||
|
||
use Jaxon\App\CallableClass; | ||
use Jaxon\Response\Response; | ||
use function Jaxon\jaxon; | ||
|
||
class Misc extends CallableClass | ||
{ | ||
public function simple(): Response | ||
public function simple() | ||
{ | ||
$this->response->alert('This is the global response!'); | ||
$aCommands = $this->response->getCommands(); | ||
$aCommands[0]->setOption('name', 'value'); | ||
return $this->response; | ||
} | ||
|
||
public function merge(): Response | ||
public function merge() | ||
{ | ||
$this->response->alert('This is the global response!'); | ||
|
||
$xResponse = jaxon()->newResponse(); | ||
$xResponse->debug('This is a different response!'); | ||
return $xResponse; | ||
} | ||
|
||
public function appendbefore(): Response | ||
public function appendbefore() | ||
{ | ||
$this->response->alert('This is the global response!'); | ||
$xResponse = jaxon()->newResponse(); | ||
$xResponse->debug('This is a different response!'); | ||
// Merge responses. No need. In v5, the commands are automatically merged. | ||
// $this->response->appendResponse($xResponse, true); | ||
return $this->response; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
<?php | ||
|
||
use Jaxon\App\CallableClass; | ||
use Jaxon\Response\Response; | ||
|
||
class TestDataBag extends CallableClass | ||
{ | ||
public function getValue(): Response | ||
public function getValue() | ||
{ | ||
$sValue = $this->response->bag('dataset')->get('key', 'Default value'); | ||
$this->response->html('div-id', $sValue); | ||
return $this->response; | ||
} | ||
|
||
public function setValue(): Response | ||
public function setValue() | ||
{ | ||
$this->response->bag('dataset')->set('key', 'value'); | ||
return $this->response; | ||
} | ||
|
||
public function updateValue(): Response | ||
public function updateValue() | ||
{ | ||
$this->response->bag('dataset')->set('key2', 'value2'); | ||
$sValue = $this->response->bag('dataset')->get('key1', 'Default value'); | ||
$this->response->html('div-id', $sValue); | ||
return $this->response; | ||
} | ||
} |
Oops, something went wrong.