/** * init() * * @return \Zend\Tool\Project\Context\Zf\ActionMethod */ public function init() { $this->_actionName = $this->_resource->getAttribute('actionName'); $this->_resource->setAppendable(false); $this->_controllerResource = $this->_resource->getParentResource(); if (!$this->_controllerResource->getContext() instanceof ControllerFile) { throw new Context\Exception('ActionMethod must be a sub resource of a ControllerFile'); } // make the ControllerFile node appendable so we can tack on the actionMethod. $this->_resource->getParentResource()->setAppendable(true); $this->_controllerPath = $this->_controllerResource->getContext()->getPath(); return $this; }
/** * init() * * @return \Zend\Tool\Project\Context\Filesystem\AbstractFilesystem */ public function init() { $parentBaseDirectory = $this->_resource->getParentResource()->getContext()->getPath(); $this->_baseDirectory = $parentBaseDirectory; return $this; }