コード例 #1
0
ファイル: ScopedObject.php プロジェクト: justinlyon/scc
 /**
  * Constructor coerces the scope of the object to the given name
  * or causes it to match the (sub)class name for each instance 
  * 
  * @param String Name for the enumeration 
  */
 public function __construct($source = null, $name = FALSE)
 {
     parent::__construct($source);
     if (!$name) {
         $this->scope = get_class($this);
     } else {
         $this->scope = $name;
     }
 }
コード例 #2
0
ファイル: ListBean.php プロジェクト: justinlyon/scc
 public function __construct($source = null)
 {
     $this->set_current_page(0);
     $this->set_page_size(0);
     $this->set_record_count(0);
     $this->set_criteria(array());
     $this->set_order_by(array());
     $this->set_list(array());
     parent::__construct($source);
 }
コード例 #3
0
ファイル: CommentsBean.php プロジェクト: ilivanoff/www
 /**
  * В конструкторе мы провалидируем настройки бина и проинициализируем protected поля
  */
 protected final function __construct()
 {
     parent::__construct();
     $this->SETTINGS = PsUtil::assertInstanceOf($this->PostBeanSettings(), PostBeanSettings::getClass());
     //Инициализируем поля для быстрого доступа внутри бина
     $this->rubricsTable = $this->SETTINGS->getRubricsTable();
     $this->rubricsView = $this->SETTINGS->getRubricsView();
     $this->postsTable = $this->SETTINGS->getPostsTable();
     $this->postsView = $this->SETTINGS->getPostsView();
     $this->commentsTable = $this->SETTINGS->getCommentsTable();
 }
コード例 #4
0
 protected function __construct()
 {
     //Убедимся в том, что константы класса не повторяются. Вообще более уместно использовать здесь enum.
     PsUtil::assertClassHasDifferentConstValues(__CLASS__, 'CODE_STATUS_');
     parent::__construct();
 }
コード例 #5
0
ファイル: Criterion.php プロジェクト: justinlyon/scc
 public function __construct($source = null)
 {
     parent::__construct($source);
 }
コード例 #6
0
ファイル: DbBean.php プロジェクト: ilivanoff/ps-sdk-dev
 /** @return DbBean */
 public static function inst()
 {
     return parent::inst();
 }
コード例 #7
0
ファイル: UploadsBean.php プロジェクト: ilivanoff/www
 protected function __construct()
 {
     $consts = self::getTypes();
     check_condition(count($consts) == count(array_unique($consts)), 'Класс ' . __CLASS__ . ' содержит повторяющиеся константы: ' . array_to_string($consts, false));
     parent::__construct();
 }
コード例 #8
0
ファイル: TESTBean.php プロジェクト: ilivanoff/www
 protected function __construct()
 {
     PsDefines::assertProductionOff(__CLASS__);
     parent::__construct();
 }
コード例 #9
0
ファイル: AdminManager.php プロジェクト: ilivanoff/www
 /** @return AdminManager */
 public static function inst()
 {
     AuthManager::checkAdminAccess();
     return parent::inst();
 }