diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Tool/Framework/Action/Base.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Tool/Framework/Action/Base.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,95 @@ +setName($options); + } + // implement $options here in the future if this is needed + } + } + + /** + * setName() + * + * @param string $name + * @return Zend_Tool_Framework_Action_Base + */ + public function setName($name) + { + $this->_name = $name; + return $this; + } + + /** + * getName() + * + * @return string + */ + public function getName() + { + if ($this->_name == null) { + $this->_name = $this->_parseName(); + } + return $this->_name; + } + + /** + * _parseName - internal method to determine the name of an action when one is not explicity provided. + * + * @param Zend_Tool_Framework_Action_Interface $action + * @return string + */ + protected function _parseName() + { + $className = get_class($this); + $actionName = substr($className, strrpos($className, '_')+1); + return $actionName; + } + +}