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


PHP Builder::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct(array $config = array())
 {
     parent::__construct($config);
     if (static::$modelStorage === null) {
         static::$modelStorage = new \SplObjectStorage();
     }
     $this->table(static::tableName());
 }
開發者ID:pfinal,項目名稱:database,代碼行數:8,代碼來源:ActiveRecord.php

示例2: __construct

 /**
  * Menu_Builder constructor.
  *
  * @param string        $title Title menu.
  * @param integer|float $position Position menu.
  */
 public function __construct($title, $position)
 {
     parent::__construct($title);
     if (!$this->position_is_valid($position)) {
         $this->position_exception();
     }
     $this->position = $position;
     $this->settings['position'] = $position;
 }
開發者ID:nocttuam,項目名稱:lyric,代碼行數:15,代碼來源:menu-builder.php

示例3: __construct

 /**
  * @param WidgetTC $wtc A widget testcase object
  * @param Zend_Config $config Takes configuration for building the widget
  */
 public function __construct($wtc)
 {
     $this->testcase = $wtc;
     // Fetch the configuration
     if (class_exists('ZEND_REGISTRY')) {
         $reg = Zend_Registry::getInstance();
         $this->appConfig = $reg->configuration;
     } else {
         // If Zend_Registry is not defined, use defaults so the
         // class can work without having defined a registry
         $this->appConfig = new stdClass();
         /// @todo: wouldn't dirname(__FILE__) work better instead of getcwd?
         $this->appConfig->testcase->cache_dir = getcwd() . '/' . self::DEFAULT_CACHEDIR;
         $this->appConfig->testcase->include_dir = getcwd() . '/' . self::DEFAULT_INCLUDEDIR;
         $this->appConfig->testcase->dir = getcwd() . '/' . self::DEFAULT_TESTCASEDIR;
     }
     $filename = tempnam($this->appConfig->cacheDir, date('Ymd') . '-');
     // filename example: 20081231-...
     parent::__construct($filename, ZIPARCHIVE::OVERWRITE);
     //echo $this->appConfig->testcaseDir.'/'.$this->testcase->path;
     //echo isset($this->appConfig->testcaseDir)?'yes':'no';
     $this->build();
 }
開發者ID:RobertGresdal,項目名稱:widget-testcase-framework,代碼行數:27,代碼來源:WidgetBuilder.class.php

示例4: array

 /**
  * Constructor.
  */
 function __construct($content, $settings)
 {
     parent::__construct($content, $settings);
     $this->styles = array();
 }
開發者ID:gopinathshiva,項目名稱:wordpress-vip-plugins,代碼行數:8,代碼來源:class-component-text-styles.php

示例5: __construct

 public function __construct(array $config = array())
 {
     parent::__construct($config);
     static::$modelStorage = new \SplObjectStorage();
 }
開發者ID:pfinal,項目名稱:database,代碼行數:5,代碼來源:EntityManager.php

示例6: __construct

 public function __construct($sourceFolder, $targetFolder, $host)
 {
     parent::__construct($sourceFolder, $targetFolder);
     $this->_host = $host;
 }
開發者ID:rayanywhere,項目名稱:webc,代碼行數:5,代碼來源:test_php_builder.php

示例7: __construct

 /**
  * Use the Builder __construct to gather the config variables
  */
 public function __construct($config = array())
 {
     // construct the parent
     parent::__construct($config);
 }
開發者ID:boiler256,項目名稱:patternlab-php,代碼行數:8,代碼來源:Generator.php

示例8: __construct

 /**
  * Submenu_Builder constructor.
  *
  * @param string  $title  Sub-menu title.
  * @param Builder $parent Parent menu.
  */
 public function __construct($title, Builder $parent)
 {
     parent::__construct($title);
     $this->parent = $parent;
 }
開發者ID:nocttuam,項目名稱:lyric,代碼行數:11,代碼來源:submenu-builder.php


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