Ejemplo n.º 1
0
 /**
  * Get a property from this Pageimage
  *
  */
 public function get($key)
 {
     if ($key == 'width') {
         return $this->width();
     }
     if ($key == 'height') {
         return $this->height();
     }
     if ($key == 'original') {
         return $this->getOriginal();
     }
     return parent::get($key);
 }
Ejemplo n.º 2
0
 /**
  * Get a property from this Pageimage
  * 
  * @param string $key
  * @return mixed
  *
  */
 public function get($key)
 {
     switch ($key) {
         case 'width':
         case 'height':
             $value = $this->{$key}();
             break;
         case 'hidpiWidth':
         case 'retinaWidth':
             $value = $this->hidpiWidth();
             break;
         case 'hidpiHeight':
         case 'retinaHeight':
             $value = $this->hidpiHeight();
             break;
         case 'original':
             $value = $this->getOriginal();
             break;
         case 'error':
             $value = $this->error;
             break;
         default:
             $value = parent::get($key);
     }
     return $value;
 }