Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created June 26, 2013 19:49
Show Gist options
  • Select an option

  • Save bayleedev/5870986 to your computer and use it in GitHub Desktop.

Select an option

Save bayleedev/5870986 to your computer and use it in GitHub Desktop.
<?php
use lithium\core\Libraries;
Libraries::applyFilter('instance', function($self, $params, $chain) {
$data = $chain->next($self, $params, $chain);
if (isset($params['options']['model'])) {
$data->applyFilter('save', function() {
// ....
});
}
return $data;
});
@agborkowski
Copy link

detection working gr8 isset(params..) is true but apply filter save wont called ;// anyway i'll debug it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment