コード例 #1
0
ファイル: ActiveRecord.php プロジェクト: pfinal/database
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     if (static::$modelStorage === null) {
         static::$modelStorage = new \SplObjectStorage();
     }
     $this->table(static::tableName());
 }
コード例 #2
0
ファイル: menu-builder.php プロジェクト: nocttuam/lyric
 /**
  * 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;
 }
コード例 #3
0
 /**
  * @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();
 }
 /**
  * Constructor.
  */
 function __construct($content, $settings)
 {
     parent::__construct($content, $settings);
     $this->styles = array();
 }
コード例 #5
0
ファイル: EntityManager.php プロジェクト: pfinal/database
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     static::$modelStorage = new \SplObjectStorage();
 }
コード例 #6
0
ファイル: test_php_builder.php プロジェクト: rayanywhere/webc
 public function __construct($sourceFolder, $targetFolder, $host)
 {
     parent::__construct($sourceFolder, $targetFolder);
     $this->_host = $host;
 }
コード例 #7
0
 /**
  * Use the Builder __construct to gather the config variables
  */
 public function __construct($config = array())
 {
     // construct the parent
     parent::__construct($config);
 }
コード例 #8
0
ファイル: submenu-builder.php プロジェクト: nocttuam/lyric
 /**
  * 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;
 }