當前位置: 首頁>>代碼示例>>PHP>>正文


PHP KObject類代碼示例

本文整理匯總了PHP中KObject的典型用法代碼示例。如果您正苦於以下問題:PHP KObject類的具體用法?PHP KObject怎麽用?PHP KObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了KObject類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _parseTemplate

 protected function _parseTemplate($xml)
 {
     $template = new KObject();
     foreach ($xml as $name) {
         if ($name->name() == 'form') {
             $template->set($name->name(), $name);
         } else {
             $template->set($name->name(), $name->data());
         }
     }
     return $template;
 }
開發者ID:ravenlife,項目名稱:Ninjaboard,代碼行數:12,代碼來源:themes.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config Configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     //Auto register locators
     foreach ($config->locators as $locator) {
         $this->registerLocator($locator);
     }
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:13,代碼來源:factory.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config	An optional ObjectConfig object with configuration options.
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     //Create the queue
     $this->_queue = $this->getObject('lib:object.queue');
     //The filter priority
     $this->_priority = $config->priority;
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:13,代碼來源:chain.php

示例4: _initialize

	protected function _initialize(KObjectConfig $config)
	{
		$config->append(array(
			'path' => ''
		));

		parent::_initialize($config);
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:8,代碼來源:abstract.php

示例5: __construct

 /**
  * Constructor.
  *
  * @param  KObjectConfig $config A KObjectConfig object with configuration options
  */
 public function __construct($config)
 {
     parent::__construct($config);
     //Set the date
     if (!$config->timezone instanceof DateTimeZone) {
         $config->timezone = new DateTimeZone($config->timezone);
     }
     //Set the date
     $this->_date = new DateTime($config->date, $config->timezone);
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:15,代碼來源:date.php

示例6: __construct

 /**
  * Construct method, add a session if options are passed
  *
  * @author  Stian Didriksen <stian@ninjaforge.com>
  * @param   $config  KConfig
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     if (isset($config->retry)) {
         $this->retry = $config->retry;
     }
 }
開發者ID:ravenlife,項目名稱:Ninja-Framework,代碼行數:13,代碼來源:curl.php

示例7: __construct

	/**
	 * Constructor
	 *
	 * Prevent creating instances of this class by making the contructor private
	 * 
	 * @param 	object 	An optional KConfig object with configuration options
	 */
	public function __construct(KConfig $config)
	{
		parent::__construct($config);
	
		// Set the view indentifier
    	$this->_template = $config->template;
	}
開發者ID:raeldc,項目名稱:com_learn,代碼行數:14,代碼來源:abstract.php

示例8: __construct

 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     foreach ($config as $key => $value) {
         $this->{$key} = $value;
     }
 }
開發者ID:stonyyi,項目名稱:anahita,代碼行數:12,代碼來源:payload.php

示例9: _initialize

 protected function _initialize(KConfig $config)
 {
     if (empty($config->adapters)) {
         $config->adapters = array('image', 'finfo');
     }
     parent::_initialize($config);
 }
開發者ID:janssit,項目名稱:www.ondernemenddiest.be,代碼行數:7,代碼來源:mimetype.php

示例10: __construct

 /**
  * Constructor.
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_state_machine = new AnDomainSpaceState();
     $this->_entities = $this->getService('anahita:domain.space.queue');
     $this->_states = new AnObjectArray();
 }
開發者ID:walteraries,項目名稱:anahita,代碼行數:12,代碼來源:space.php

示例11: __construct

	/**
	 * Constructor.
	 *
	 * @param 	object 	An optional KConfig object with configuration options
	 */
	public function __construct( KConfig $config = null) 
	{ 
		//If no config is passed create it
		if(!isset($config)) $config = new KConfig();
		
		parent::__construct($config);
	}
開發者ID:raeldc,項目名稱:com_learn,代碼行數:12,代碼來源:abstract.php

示例12: _initialize

    /**
     * Initializes the options for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param   object  An optional KConfig object with configuration options
     * @return void
     */
    protected function _initialize(KConfig $config)
    {
        $config->append(array(
            'priority'   => KCommand::PRIORITY_NORMAL,
        ));

        parent::_initialize($config);
    }
開發者ID:raeldc,項目名稱:com_learn,代碼行數:16,代碼來源:command.php

示例13: _initialize

 	/**
     * Initializes the options for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param   object  An optional KConfig object with configuration options
     * @return  void
     */
    protected function _initialize(KConfig $config)
    {
        $config->append(array(
            'data'  => array(),
        ));

        parent::_initialize($config);
    }
開發者ID:raeldc,項目名稱:com_learn,代碼行數:16,代碼來源:array.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_session = $config->session;
     if (!$this->_session instanceof ComConnectOauthServiceAbstract) {
         throw new InvalidArgumentException('Session must be an intance of ComConnectOauthServiceAbstract');
     }
 }
開發者ID:stonyyi,項目名稱:anahita,代碼行數:13,代碼來源:abstract.php

示例15: __construct

 /**
  * Constructor.
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct(null);
     $this->_store = $config->store;
     foreach ($config->resources as $resource) {
         $this->insert($resource);
     }
 }
開發者ID:stonyyi,項目名稱:anahita,代碼行數:13,代碼來源:set.php


注:本文中的KObject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。