Filters a request and tests whether it is a file in the webroot folder or not and serves the file to the client if appropriate.
AssetDispatcher _deliverAsset( CakeResponse $response , string $assetFile , string $ext )
Sends an asset file to the client
CakeResponse $response $assetFile $ext _filterAsset( CakeEvent $event )
Checks if the client is requesting a filtered asset and runs the corresponding filter if any is configured
CakeEvent $event CakeResponse_getAssetFile( string $url )
Builds asset file path based off url
$url stringbeforeDispatch( CakeEvent $event )
Checks if a requested asset exists and sends it to the browser
CakeEvent $event mixedNotFoundExceptionDispatcherFilter::beforeDispatch() __construct( array $settings array() )
Constructor.
$settings optional array() afterDispatch( CakeEvent $event )
Method called after the controller served a request and generated a response. It is possible to alter the response object at this point as it is not sent to the client yet.
If false is returned, the event will be stopped and no more listeners will be notified. Alternatively you can call $event->stopPropagation() to achieve the same result.
CakeEvent $event request and response keys in the data property.mixedimplementedEvents( )
Returns the list of events this filter listens to. Dispatcher notifies 2 different events Dispatcher.before and Dispatcher.after. By default this class will attach preDispatch and postDispatch method respectively.
Override this method at will to only listen to the events you are interested in.
arrayCakeEventListener::implementedEvents()
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-AssetDispatcher.html