Created
October 2, 2014 22:02
-
-
Save firegoby/67f48ec1967e19b6c3c6 to your computer and use it in GitHub Desktop.
Timestamp parameter extension for Symphony CMS
This file contains hidden or 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
<?php | |
Class extension_timestamp_parameter extends Extension { | |
public function install() { | |
} | |
public function uninstall() { | |
} | |
public function getSubscribedDelegates(){ | |
return array( | |
array( | |
'page' => '/frontend/', | |
'delegate' => 'FrontendParamsResolve', | |
'callback' => '__addParam' | |
) | |
); | |
} | |
/** | |
* Add timestamp to parameter pool | |
* | |
* @param array $context | |
* delegate context | |
*/ | |
public function __addParam($context) { | |
$context['params']['timestamp'] = getdate()[0]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment