public function applyAction(&$source, &$target, $handler, &$action)
    {
        $result = null;
        $this->hook->attach('image.style.apply.before', $source, $target, $handler, $action, $result);

        if (isset($result)) {
            return $result;
        }

        try {
            $callback = Handler::get($handler, null, 'process');
            $result = call_user_func_array($callback, array(&$source, &$target, &$action));
        } catch (Exception $ex) {
            $result = $ex->getMessage();
        }

        $this->hook->attach('image.style.apply.after', $source, $target, $handler, $action, $result);
        return $result;
    }
public function applyAction(&$source, &$target, $handler, &$action)
    {
        $result = null;
        $this->hook->attach('image.style.apply.before', $source, $target, $handler, $action, $result);

        if (isset($result)) {
            return $result;
        }

        try {
            $callback = Handler::get($handler, null, 'process');
            $result = call_user_func_array($callback, array(&$source, &$target, &$action));
        } catch (Exception $ex) {
            $result = $ex->getMessage();
        }

        $this->hook->attach('image.style.apply.after', $source, $target, $handler, $action, $result);
        return $result;
    }
public function applyAction ( & $ source , & $ target , $ handler , & $ action ) { $ result = null ; $ this -> hook -> attach ( 'image.style.apply.before' , $ source , $ target , $ handler , $ action , $ result ) ; if ( isset ( $ result ) ) { return $ result ; } try { $ callback = Handler :: get ( $ handler , null , 'process' ) ; $ result = call_user_func_array ( $ callback , array ( & $ source , & $ target , & $ action ) ) ; } catch ( Exception $ ex ) { $ result = $ ex -> getMessage ( ) ; } $ this -> hook -> attach ( 'image.style.apply.after' , $ source , $ target , $ handler , $ action , $ result ) ; return $ result ; }
Apply a single action to an image file
@param string $source
@param string $target
@param array $handler
@param array $action
@return boolean|string
Apply a single action to an image file