/**
  * Конструктор, инициализирует параметры
  *
  * @param array $aParams
  */
 public function __construct($aParams = array())
 {
     parent::__construct();
     if ($aParams) {
         $this->aParams = array_merge($this->aParams, $aParams);
     }
 }
 /**
  * Устанавливает список объектов
  *
  * @param $aCollection	Список объектов связи
  */
 public function __construct($aCollection)
 {
     parent::__construct();
     if (!$aCollection) {
         $aCollection = array();
     }
     if (!is_array($aCollection)) {
         $aCollection = array($aCollection);
     }
     foreach ($aCollection as $oEntity) {
         $this->aCollection[$oEntity->_getPrimaryKeyValue()] = $oEntity;
     }
 }
예제 #3
0
 /**
  * @param string|null $sLockFile Полный путь до лок файла, например <pre>Config::Get('sys.cache.dir').'notify.lock'</pre>
  */
 public function __construct($sLockFile = null)
 {
     parent::__construct();
     $this->sProcessName = get_class($this);
     $oEngine = Engine::getInstance();
     /**
      * Инициализируем ядро
      */
     $oEngine->Init();
     if (!empty($sLockFile)) {
         $this->oLockFile = fopen($sLockFile, 'a');
     }
     /**
      * Инициализируем лог и делает пометку о старте процесса
      */
     $this->Log('Cron process started');
 }
예제 #4
0
 /**
  * Конструктор
  *
  * @param string $sAction Название экшена
  */
 public function __construct($sAction)
 {
     parent::__construct();
     $this->RegisterEvent();
     $this->sCurrentAction = $sAction;
     $this->aParams = Router::GetParams();
 }
예제 #5
0
 /**
  * Загрузка конфига роутинга при создании объекта
  */
 public function __construct()
 {
     parent::__construct();
     $this->LoadConfig();
 }
 /**
  * Если передать в конструктор ассоциативный массив свойств и их значений, то они автоматом загрузятся в сущность
  *
  * @param array|false $aParam	Ассоциативный массив данных сущности
  */
 public function __construct($aParam = false)
 {
     parent::__construct();
     $this->_setData($aParam);
     $this->Init();
 }
예제 #7
0
 /**
  * При создании блока передаем в него параметры
  *
  * @param array $aParams Список параметров блока
  */
 public function __construct($aParams)
 {
     parent::__construct();
     $this->aParams = $aParams;
 }
 /**
  * Передаем коннект к БД
  *
  * @param DbSimple_Database $oDb
  */
 public function __construct(DbSimple_Database $oDb)
 {
     parent::__construct();
     $this->oDb = $oDb;
 }