entity; switch ($name) { case 'childCount': return $folder->getChildCount(); case 'view': $view = $folder->getView(); return $view !== null ? new FolderViewProxy($this->graph, $view) : null; default: return parent::__get($name); } } }