Releases: CradlePHP/framework
Releases · CradlePHP/framework
branch release
2.3.0 updating dependencies
casing for a const to determine the cwl
2.2.6 casing for a const to determine the cwl
fix: cli check only if root package
2.2.5 cli check only if root package
Found another way to determine a package root path
2.2.4 Found another way to determine a package root path
new component requirements
2.2.3 new component requirements
method update
method()
now accepts an array as the request like $this->method('event', ['foo' => 'bar']);
Removing composer lock
2.2.1 Removing composer lock
Routes can be organized by priorities, up versioned but backwards compatible
$this->get('/admin/system/model/role/create', function ($request, $response) {
...
}, 10);
Where the highest priority (in this case 10) will be executed first (highest-to-lowest)
Adding help event in help class
2.1.8 adding help event in help class
added 2 functions getPayload() and method()
getPayload()
- returns a new Request
and Response
(RnR) object. This was created as an alternative to manually creating RnRs in controllers and events. Used best with sub event calls.
Usage
$payload = $this->getPayload();
$this->trigger('event-name', $payload['request'], $payload['response']);
method()
- Calls an event and returns the results from response. This was created as an alternative to manually getting the response for each event call.
Usage
$categories = $this->method('category-search', $request);
If there is a response error, this function will return false
. If you want to also get the response object as a whole you can pass it into the arguments like the following.
$categories = $this->method('category-search', $request, $response);