/** * Constructor * * Initializes a TIP_Request instance. * * @param array $options Properties values */ protected function __construct($options) { parent::__construct($options); }
/** * Constructor * * Initializes a TIP_Class instance. * * @param array $options Properties values */ protected function __construct($options) { parent::__construct($options); $this->_current_data =& $this->data; }
/** * Constructor * * Initializes a TIP_Devhelp2 instance. * * @param array $options Properties values */ protected function __construct($options) { // By default, do not use a built-in template: if needed, // it must be explicitely set in the $options array $this->view_template = null; parent::__construct($options); }
/** * Constructor * * Initializes a TIP_User instance and performs the user authentication. * * Notice in this constructor no external modules can be called, because * many of them (if not all) depend on TIP_User. So the eventual errors * are stored in the $_constructor_error private property and processed * in the postConstructor() method. * * @param array $options Properties values */ protected function __construct($options) { parent::__construct($options); $this->keys['CID'] = null; // Get user id and password from the TIP_User cookie @(list($id, $password) = explode(',', TIP::getCookie('TIP_User', 'string'), 2)); if (is_null($id) || is_null($password)) { // Anonymous access return; } // Get user id and password from the data source: this view is // never ended to keep the current user as default row $view = $this->startDataView($this->data->rowFilter((int) $id)); if (is_null($view)) { $this->_constructor_error = 'select'; return; } $this->_row =& $view->current(); if (is_null($this->_row)) { // User id not found in the data source $this->_constructor_error = 'notfound'; } elseif (crypt($this->_row['password'], $password) != $password) { // Invalid password $this->_constructor_error = 'denied'; } }