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


PHP KObject::__construct方法代碼示例

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


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

示例1: __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

示例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 	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

示例4: __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

示例5: __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

示例6: __construct

 public function __construct(KConfig $config = null)
 {
     parent::__construct($config);
     if (isset($config->adapters)) {
         $this->_adapters = KConfig::unbox($config->adapters);
     }
 }
開發者ID:janssit,項目名稱:www.ondernemenddiest.be,代碼行數:7,代碼來源:mimetype.php

示例7: __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

示例8: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config An optional ObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->_bootstrapped = false;
     //Force a reload if cache is enabled and we have already bootstrapped
     if ($config->force_reload && $config->bootstrapped) {
         $config->bootstrapped = false;
         $config->directories = array();
         $config->components = array();
         $config->domains = array();
         $config->namespaces = array();
         $config->files = array();
         $config->aliases = array();
         $config->identifiers = array();
         $config->applications = array();
     }
     $this->_directories = KObjectConfig::unbox($config->directories);
     $this->_components = KObjectConfig::unbox($config->components);
     $this->_domains = KObjectConfig::unbox($config->domains);
     $this->_namespaces = KObjectConfig::unbox($config->namespaces);
     $this->_files = KObjectConfig::unbox($config->files);
     $this->_applications = KObjectConfig::unbox($config->applications);
     $this->_aliases = KObjectConfig::unbox($config->aliases);
     $this->_identifiers = KObjectConfig::unbox($config->identifiers);
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:30,代碼來源:bootstrapper.php

示例9: __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

示例10: __construct

 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     $this->_description = $config->description;
     parent::__construct($config);
     $this->_validations = $config->validations;
     $this->_filters = array();
 }
開發者ID:NicholasJohn16,項目名稱:anahita,代碼行數:12,代碼來源:abstract.php

示例11: __construct

 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  *
  * @return void
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $paths = array_reverse(KConfig::unbox($config->asset_paths));
     foreach ($paths as $path) {
         $this->addPath($path);
     }
 }
開發者ID:walteraries,項目名稱:anahita,代碼行數:15,代碼來源:asset.php

示例12: __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

示例13: __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

示例14: __construct

 /**
  * Constructor.
  *
  * @param KObjectConfig $config Configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     $this->_catalogue = $config->catalogue;
     $this->_loaded = array();
     $this->setLocaleFallback($config->locale_fallback);
     $this->setLocale($config->locale);
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:13,代碼來源:abstract.php

示例15: __construct

 /**
  * Constructor
  *
  * @param KObjectConfig $config  An optional KObjectConfig object with configuration options
  */
 public function __construct(KObjectConfig $config)
 {
     parent::__construct($config);
     //Set the token type
     $this->setType($config->type);
     //Set the token header
     $this->setAlgorithm($config->algorithm);
 }
開發者ID:daodaoliang,項目名稱:nooku-framework,代碼行數:13,代碼來源:token.php


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