for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Zemit Framework.
*
* (c) Zemit Team <[email protected]>
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Zemit\Mvc\Model\Behavior;
use Phalcon\Mvc\Model\Behavior;
use Phalcon\Mvc\ModelInterface;
class Action extends Behavior
{
use SkippableTrait;
* @return void
public function notify(string $type, ModelInterface $model)
if (!$this->isEnabled()) {
return;
}
if (!$this->mustTakeAction($type)) {
$options = $this->getOptions($type);
if (empty($options)) {
foreach ($options as $action => $value) {
assert(is_callable($value));
$value($model, $action);