示例#1
0
文件: Mvc.php 项目: realfluid/umbaugh
 /**
  * Returns an array representation of the page
  *
  * @return array  associative array containing all page properties
  */
 public function toArray()
 {
     return array_merge(
         parent::toArray(),
         array(
             'action'       => $this->getAction(),
             'controller'   => $this->getController(),
             'module'       => $this->getModule(),
             'params'       => $this->getParams(),
             'route'        => $this->getRoute(),
             'reset_params' => $this->getResetParams()
         ));
 }
示例#2
0
文件: Uri.php 项目: rapsli/404crawler
 /**
  * Returns an array representation of the page
  *
  * @return array
  */
 public function toArray()
 {
     return array_merge(parent::toArray(), array('uri' => $this->getUri()));
 }
示例#3
0
 /**
  * Converts a Zend_Navigation_Page subclass object to a corresponding Omeka object
  *
  * @param Zend_Navigation_Page $page The page to convert
  * @param string $subclassPostfix The postfix of the subclass.  Must be 'Uri' or 'Mvc'
  * @return Omeka_Navigation_Page_Uri|Omeka_Navigation_Page_Mvc The converted page
  */
 protected function _convertZendToOmekaNavigationPage(Zend_Navigation_Page $page, $subclassPostfix)
 {
     // change the type of page
     $fromClass = 'Zend_Navigation_Page_' . $subclassPostfix;
     $toClass = 'Omeka_Navigation_Page_' . $subclassPostfix;
     $pageOptions = $this->_conditionalReplaceValueInArray($page->toArray(), 'pages', 'type', $fromClass, $toClass);
     $convertedPage = new $toClass();
     $convertedPage->setOptions($pageOptions);
     return $convertedPage;
 }