當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。