src/Model/Entity.php
public function dispatch($method, $parameters = [])
    {
        $base = ucfirst($method);
        $traits = $this->getRecursiveTraits();

        foreach ($traits as $trait) {
            $trait = explode('\\', $trait);
            $trait = str_replace('model', '', strtolower(array_pop($trait)));

            $method = $trait.$base;

            if (method_exists($this, $method)) {
                call_user_func_array([$this, $method], $parameters);
            }
        }
    }
public function dispatch($method, $parameters = [])
    {
        $base = ucfirst($method);
        $traits = $this->getRecursiveTraits();

        foreach ($traits as $trait) {
            $trait = explode('\\', $trait);
            $trait = str_replace('model', '', strtolower(array_pop($trait)));

            $method = $trait.$base;

            if (method_exists($this, $method)) {
                call_user_func_array([$this, $method], $parameters);
            }
        }
    }
public function dispatch ( $ method , $ parameters = [ ] ) { $ base = ucfirst ( $ method ) ; $ traits = $ this -> getRecursiveTraits ( ) ; foreach ( $ traits as $ trait ) { $ trait = explode ( '\\' , $ trait ) ; $ trait = str_replace ( 'model' , '' , strtolower ( array_pop ( $ trait ) ) ) ; $ method = $ trait . $ base ; if ( method_exists ( $ this , $ method ) ) { call_user_func_array ( [ $ this , $ method ] , $ parameters ) ; } } }
Calls a given method on all the current's class used traits, based on a prefix

@param string $method     Method name
@param array  $parameters Method parameters

@return void
Calls a given method on all the current s class used traits based on a prefix