CakeEventManager::_extractCallable PHP Method

_extractCallable() protected method

Auxiliary function to extract and return a PHP callback type out of the callable definition from the return value of the implementedEvents method on a CakeEventListener
protected _extractCallable ( array $function, CakeEventListener $object ) : callback
$function array the array taken from a handler definition for an event
$object CakeEventListener The handler object
return callback
    protected function _extractCallable($function, $object)
    {
        $method = $function['callable'];
        $options = $function;
        unset($options['callable']);
        if (is_string($method)) {
            $method = array($object, $method);
        }
        return array($method, $options);
    }