original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Apply a single action to an image file
  @param string $source
  @param string $target
  @param array $handler
  @param array $action
  @return boolean|string
docstring_tokens: Apply a single action to an image file