CakePHP Cookbook 2.x
$amount1 + $amount2; } } Note All components must extend Component. Failing to do this will trigger an exception. Including your component in your controllers Once our component is finished, we can triggering events about itself, using $this will be the most common case. Although a Component could trigger controller events too. The subject class is important because listeners will get immediate access receive $orderData instead of the $event object. This is so, because in our previous example we trigger the Model.Order.afterPlace event with some data: $event = new CakeEvent('Model.Order.afterPlace'0 码力 | 1096 页 | 958.62 KB | 1 年前3
Guzzle PHP 5.3 Documentationpropagation Describes whether or not other event listeners are triggered. Event emitters will trigger every event listener registered to a specific event in priority order until all of the listeners event chain. GuzzleHttp\Event\RequestEvents::PREPARE_REQUEST Used when you want a listener to be trigger while a request is being prepared during the before event. This event priority is used by the G $response->getStatusCode(); // 200 Attention Any exception encountered while executing the before event will trigger the error event of a request. complete The complete event is emitted after a transaction completes0 码力 | 72 页 | 312.62 KB | 11 月前3
CakePHP Cookbook Documentation 5.x'Comments', Configure::read('Comments')); } Request Life-cycle Callbacks CakePHP controllers trigger several events/callbacks that you can use to insert logic around the request life-cycle: Event List $amount2; } } Note All components must extend Cake\Controller\Component. Failing to do this will trigger an exception. Including your Component in your Controllers Once our component is finished, we can cache config, but you can use the config option to change this. View Events Like Controller, view trigger several events/callbacks that you can use to insert logic around the rendering life-cycle: Event0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook Documentation 5.x('Comments', Configure::read('Comments')); } Request Life-cycle Callbacks CakePHP controllers trigger several events/callbacks that you can use to insert logic around the request life-cycle: Event List $amount2; } } Note: All components must extend Cake\Controller\Component. Failing to do this will trigger an exception. Including your Component in your Controllers Once our component is finished, we can cache config, but you can use the config option to change this. View Events Like Controller, view trigger several events/callbacks that you can use to insert logic around the rendering life-cycle: Event0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook 2.x
return $amount1 + $amount2; } } Note: All components must extend Component. Failing to do this will trigger an exception. Including your component in your controllers Once our component is finished, we can triggering events about itself, using $this will be the most common case. Although a Component could trigger controller events too. The subject class is important because listeners will get immediate access receive $orderData instead of the $event object. This is so, because in our previous example we trigger the Model.Order.afterPlace event with some data: $event = new CakeEvent('Model.Order.afterPlace'0 码力 | 820 页 | 2.52 MB | 1 年前3
CakePHP Cookbook 4.x
safe. Table::newEmptyEntity() has been added to create a new and empty entity object. This does not trigger any field validation. The entity can be persisted without validation error as an empty record. C dependent association fails to delete during cascadeCallback operations. Table::saveMany() will now trigger the Model.afterSaveCommit event on entities that are saved. Routing A convenience function urlArray() RequestHandlerComponent has been soft-deprecated. Like AuthComponent using RequestHandler will not trigger runtime deprecations but it will be removed in 5.0. Replace accepts() with $this->request->accepts()0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 4.x
• Table::newEmptyEntity() has been added to create a new and empty entity object. This does not trigger any field validation. The entity can be persisted without validation error as an empty record. • dependent association fails to delete during cascadeCallback operations. • Table::saveMany() will now trigger the Model.afterSaveCommit event on entities that are saved. 4.1 Migration Guide 47 CakePHP Cookbook RequestHandlerComponent has been soft-deprecated. Like AuthComponent using RequestHandler will not trigger runtime deprecations but it will be removed in 5.0. • Replace accepts() with $this->request->accepts()0 码力 | 967 页 | 2.88 MB | 1 年前3
Laravel 5.0 Documentation
function($value) { return User::where('name', $value)->first(); }); There are two ways to manually trigger a 404 error from a route. First, you may use the abort helper: abort(404); The abort helper elixir(function(mix) { Compile Sass Compile CoffeeScript Compile All Less and CoffeeScript Trigger PHPUnit Tests Trigger PHPSpec Tests Combine Stylesheets Combine Stylesheets and Save to a Custom Directory version("css/bootstrap.css"); }); Now that you've told Elixir which tasks to execute, you only need to trigger Gulp from the command line. gulp gulp watch gulp tdd Note: All tasks will assume a development0 码力 | 242 页 | 1.44 MB | 1 年前3
CakePHP Cookbook 3.x
now emits deprecation warnings when the $context parameter is a boolean or string. These values trigger fatal errors in 4.0 and will need to be updated before upgrading. The magic method signature for action. The ajaxLogin option for AuthComponent is deprecated. You should use the 403 status code to trigger the correct behavior in clientside code now. The beforeRedirect method of RequestHandlerComponent function has been added. This function provides a snippet of code that can be put into eval() to trigger an interactive console. This is very helpful when debugging in test cases, or other CLI scripts.0 码力 | 1244 页 | 1.05 MB | 1 年前3
CakePHP Cookbook 3.x
now emits deprecation warnings when the $context parameter is a boolean or string. These values trigger fatal errors in 4.0 and will need to be updated before upgrading. • The magic method signature for • The ajaxLogin option for AuthComponent is deprecated. You should use the 403 status code to trigger the correct behavior in clientside code now. • The beforeRedirect method of RequestHandlerComponent function has been added. This function provides a snippet of code that can be put into eval() to trigger an interactive console. This is very helpful when debugging in test cases, or other CLI scripts.0 码力 | 967 页 | 2.80 MB | 1 年前3
共 54 条
- 1
- 2
- 3
- 4
- 5
- 6













