当前位置: 首页>>代码示例>>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;未经允许,请勿转载。