当前位置: 首页>>代码示例>>PHP>>正文


PHP KObjectConfig::toArray方法代码示例

本文整理汇总了PHP中KObjectConfig::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP KObjectConfig::toArray方法的具体用法?PHP KObjectConfig::toArray怎么用?PHP KObjectConfig::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KObjectConfig的用法示例。


在下文中一共展示了KObjectConfig::toArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _fetchData

 protected function _fetchData(KViewContext $context)
 {
     $state = $this->getModel()->getState();
     $container = $this->getModel()->getContainer();
     $config = new KObjectConfig($state->config);
     $config->append(array('router' => array('defaults' => array('option' => 'com_' . substr($container->slug, 0, strpos($container->slug, '-')), 'routed' => '1')), 'initial_response' => true))->append($this->getConfig()->config);
     if ($config->initial_response === true) {
         $count = 0;
         $query = $state->getValues();
         unset($query['config']);
         $query['thumbnails'] = $this->getModel()->getContainer()->getParameters()->thumbnails;
         if (strpos($this->getLayout(), 'compact') !== false) {
             $query['limit'] = 0;
             $count = ComFilesIteratorDirectory::countNodes(array('path' => $this->getModel()->getPath()));
         }
         if ($count < 100) {
             $controller = $this->getObject('com:files.controller.node');
             $controller->getRequest()->setQuery($query);
             $config->initial_response = $controller->format('json')->render();
         } else {
             unset($config->initial_response);
         }
     }
     $state->config = $config->toArray();
     $context->data->sitebase = trim(JURI::root(), '/');
     $context->data->token = $this->getObject('user')->getSession()->getToken();
     $context->data->container = $container;
     $context->data->debug = KClassLoader::getInstance()->isDebug();
     parent::_fetchData($context);
     $context->parameters = $state->getValues();
     $context->parameters->config = $config;
 }
开发者ID:nooku,项目名称:nooku-files,代码行数:32,代码来源:html.php

示例2: _getRoute

 /**
  * Convert an array to a URL
  *
  * @param KObjectConfig $config
  * @param bool          $fqr
  * @param bool          $escape
  * @return string Routed URL
  */
 protected function _getRoute(KObjectConfig $config, $fqr = false, $escape = true)
 {
     unset($config->entity);
     return call_user_func_array($this->_router, array($config->toArray(), $fqr, $escape));
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:13,代码来源:route.php

示例3: unbox

 /**
  * Return the data
  *
  * If the data being passed is an instance of KObjectConfig the data will be transformed to an associative array.
  *
  * @param mixed|KObjectConfig $data
  * @return mixed|array
  */
 public static function unbox($data)
 {
     return $data instanceof KObjectConfig ? $data->toArray() : $data;
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:12,代码来源:config.php


注:本文中的KObjectConfig::toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。