Skip to content

Instantly share code, notes, and snippets.

@mrmorris
Created October 2, 2012 17:35
Show Gist options
  • Save mrmorris/3821470 to your computer and use it in GitHub Desktop.
Save mrmorris/3821470 to your computer and use it in GitHub Desktop.
// in bootstrap
Configure::write('Dispatcher.filters', array(
'fb-prefix' => array(
'callable' => function($event){
/*
if (isset($this->params['prefix']) && method_exists($controller, $this->params['prefix'] . '_' . $this->params['action'])) {
$this->params['action'] = $this->params['prefix'] . '_' . $this->params['action'];
} elseif (strpos($this->params['action'], '_') > 0) {
list($prefix, $action) = explode('_', $this->params['action']);
$privateAction = in_array($prefix, $prefixes);
}
*/
if (
!empty($event->data['request']->params['prefix']) &&
$event->data['request']->params['prefix'] == 'fb' &&
//method_exists()
) {
}
},
'on' => 'before'
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment