entity; switch ($name) { case 'height': return $image->getHeight(); case 'width': return $image->getWidth(); default: return parent::__get($name); } } }