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


PHP KObjectConfig::unbox方法代码示例

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


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

示例1: _afterReset

 /**
  * Reset the cached container object if container changes
  *
  * @param KModelContextInterface $context
  */
 protected function _afterReset(KModelContextInterface $context)
 {
     $modified = (array) KObjectConfig::unbox($context->modified);
     if (in_array('container', $modified)) {
         unset($this->_container);
     }
 }
开发者ID:nooku,项目名称:nooku-files,代码行数:12,代码来源:thumbnails.php

示例2: __construct

 /**
  * Constructor
  *
  * @param KObjectConfig $config  An optional ObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     //Session write and close handlers are called after destructing objects since PHP 5.0.5.
     if (version_compare(phpversion(), '5.4.0', '>=')) {
         session_register_shutdown();
     } else {
         register_shutdown_function('session_write_close');
     }
     //Only configure the session if it's not active yet
     if (!$this->isActive()) {
         //Set the session options
         $this->setOptions($config->options);
         //Set the session name
         if (!empty($config->name)) {
             $this->setName($config->name);
         }
         //Set the session identifier
         if (!empty($config->id)) {
             $this->setId($config->id);
         }
         //Set the session handler
         $this->setHandler($config->handler, KObjectConfig::unbox($config));
     }
     //Set the session namespace
     $this->setNamespace($config->namespace);
     //Set lifetime time
     $this->getContainer('metadata')->setLifetime($config->lifetime);
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:34,代码来源:abstract.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config Configuration options.
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->_title_column = KObjectConfig::unbox($config->title_column);
     $this->_controller = $config->controller;
     $this->setActions(KObjectConfig::unbox($config->actions));
 }
开发者ID:jebbdomingo,项目名称:nooku-activities,代码行数:12,代码来源:logger.php

示例4: __construct

 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->setThumbnailSize(KObjectConfig::unbox($config->thumbnail_size));
     $this->_container = $config->container;
     $this->_folder = $config->folder;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:thumbnailable.php

示例5: _afterReset

 /**
  * Reset the cached container object if container changes
  *
  * @param KModelContextInterface $context
  */
 protected function _afterReset(KModelContextInterface $context)
 {
     $modified = (array) KObjectConfig::unbox($context->modified);
     if (in_array('container', $modified)) {
         self::$_container = null;
     }
 }
开发者ID:nooku,项目名称:nooku-files,代码行数:12,代码来源:nodes.php

示例6: _saveGroups

 protected function _saveGroups(KDatabaseRowInterface $entity)
 {
     $table = $this->getObject('com://admin/docman.database.table.levels');
     $row = $table->select(array('entity' => $entity->uuid), KDatabase::FETCH_ROW);
     $groups = KObjectConfig::unbox($entity->groups);
     $access = null;
     if (is_array($groups) && count($groups)) {
         sort($groups);
         $row->groups = implode(',', array_map('intval', $groups));
         $row->entity = $entity->uuid;
         if ($row->save()) {
             $access = -1 * $row->id;
         }
     } elseif ($entity->inherit || $groups) {
         if (!$row->isNew()) {
             $row->delete();
         }
         $access = $groups ?: self::INHERIT;
     }
     if ($access !== null) {
         if ($entity->getIdentifier()->name === 'document') {
             $entity->access = $access;
         } else {
             $entity->access_raw = $access;
         }
     }
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:27,代码来源:permissible.php

示例7: __construct

    public function __construct(KObjectConfig $config)
    {
        parent::__construct($config);

        $this->_redirect_schemes = KObjectConfig::unbox($config->redirect_schemes);
        $this->_redirect_unknown = $config->redirect_unknown;
    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:redirectable.php

示例8: __construct

 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     if (isset($config->adapters)) {
         $this->_adapters = KObjectConfig::unbox($config->adapters);
     }
 }
开发者ID:nooku,项目名称:nooku-files,代码行数:7,代码来源:mimetype.php

示例9: __construct

 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     if ($config->fields) {
         $this->_fields = KObjectConfig::unbox($config->fields);
     }
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:timezonable.php

示例10: __construct

 /**
  * Object constructor
  *
  * @param   KObjectConfig $config Configuration options
  * @throws InvalidArgumentException
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     if (is_null($config->command_chain)) {
         throw new InvalidArgumentException('command_chain [KCommandChainInterface] config option is required');
     }
     //Create a command chain object
     $this->__command_chain = $config->command_chain;
     //Add the event subscribers
     $handlers = (array) KObjectConfig::unbox($config->command_handlers);
     foreach ($handlers as $key => $value) {
         if (is_numeric($key)) {
             $this->addCommandHandler($value);
         } else {
             $this->addCommandHandler($key, $value);
         }
     }
     //Add the command callbacks
     foreach ($this->getMixer()->getMethods() as $method) {
         $match = array();
         if (preg_match('/_(after|before)([A-Z]\\S*)/', $method, $match)) {
             $this->addCommandCallback($match[1] . '.' . strtolower($match[2]), $method);
         }
     }
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:31,代码来源:mixin.php

示例11: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config	An optional ObjectConfig object with configuration options.
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     //Set the supported methods
     $this->_methods = KObjectConfig::unbox($config->methods);
     //Load the dispatcher translations
     $this->addCommandCallback('before.dispatch', '_loadTranslations');
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:13,代码来源:http.php

示例12: __construct

 /**
  * Constructor
  *
  * @param KObjectConfig $config  An optional KObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $headers = KObjectConfig::unbox($config->headers);
     foreach ($headers as $key => $values) {
         $this->set($key, $values);
     }
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:13,代码来源:headers.php

示例13: _initialize

 protected function _initialize(KObjectConfig $config)
 {
     $size = KObjectConfig::unbox($config->size);
     if (empty($size)) {
         $config->size = array('x' => 200, 'y' => 150);
     }
     parent::_initialize($config);
 }
开发者ID:nooku,项目名称:nooku-files,代码行数:8,代码来源:thumbnail.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param   KObjectConfig $config Configuration options
  */
 public function __construct(KObjectConfig $config = null)
 {
     parent::__construct($config);
     $this->_title = $config->title;
     $this->_class = $config->class;
     $this->_styles = KObjectConfig::unbox($config->styles);
     $this->_attribs = KObjectConfig::unbox($config->attribs);
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:13,代码来源:chrome.php

示例15: startPanel

 /**
  * Creates a tab panel with title and starts that panel
  *
  * @param   array|KObjectConfig $config An optional array with configuration options
  * @return  string Html
  */
 public function startPanel($config = array())
 {
     $translator = $this->getObject('translator');
     $config = new KObjectConfigJson($config);
     $config->append(array('title' => $translator->translate('Slide'), 'id' => '', 'translate' => true));
     $title = $config->translate ? $translator->translate($config->title) : $config->title;
     return JHtml::_('sliders.panel', $title, KObjectConfig::unbox($config->attribs));
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:14,代码来源:accordion.php


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