_registry = $registry; return $this; } /** * Show Action * * @param string $mode The mode switch can be one of: major, minor, or mini (default) * @param bool $nameIncluded */ public function show($mode = self::MODE_MINI, $nameIncluded = true) { $versionInfo = $this->_splitVersion(); switch($mode) { case self::MODE_MINOR: unset($versionInfo['mini']); break; case self::MODE_MAJOR: unset($versionInfo['mini'], $versionInfo['minor']); break; } $output = implode('.', $versionInfo); if ($nameIncluded) { $output = 'Zend Framework Version: ' . $output; } $this->_registry->response->appendContent($output); } public function showMajorPart($nameIncluded = true) { $versionNumbers = $this->_splitVersion(); $output = (($nameIncluded == true) ? 'ZF Major Version: ' : null) . $versionNumbers['major']; $this->_registry->response->appendContent($output); } public function showMinorPart($nameIncluded = true) { $versionNumbers = $this->_splitVersion(); $output = (($nameIncluded == true) ? 'ZF Minor Version: ' : null) . $versionNumbers['minor']; $this->_registry->response->appendContent($output); } public function showMiniPart($nameIncluded = true) { $versionNumbers = $this->_splitVersion(); $output = (($nameIncluded == true) ? 'ZF Mini Version: ' : null) . $versionNumbers['mini']; $this->_registry->response->appendContent($output); } protected function _splitVersion() { list($major, $minor, $mini) = explode('.', Zend_Version::VERSION); return array('major' => $major, 'minor' => $minor, 'mini' => $mini); } }