コード例 #1
0
 function __call($method, $args)
 {
     if (!$this->get_mixin_providing($method)) {
         return call_user_func_array(array(&$this->wrapper, $method), $args);
     } else {
         return parent::__call($method, $args);
     }
 }
コード例 #2
0
 /**
  * Gets the url or path of an image of a particular size
  * @param string $method
  * @param array $args
  */
 function __call($method, $args)
 {
     if (preg_match("/^get_(\\w+)_(abspath|url|dimensions|html|size_params)\$/", $method, $match)) {
         if (isset($match[1]) && isset($match[2]) && !$this->has_method($method)) {
             $method = 'get_image_' . $match[2];
             $args[] = $match[1];
             // array($image, $size)
             return parent::__call($method, $args);
         }
     }
     return parent::__call($method, $args);
 }