/** * Result set constructor * @param Connection $cnx Parent connection */ public function __construct(Connection $cnx) { parent::__construct(); $this->cnx = $cnx; $this->fetchMode = $this->connection->getDefaultFetchMode(); $this->prefetch(); }
/** * Transaction constructor * @param Connection $cnx Parent connection * @param string|null $name Transaction name. Null if none. * @throws DBException */ public function __construct(Connection $cnx, $name = null) { parent::__construct(); $this->cnx = $cnx; $this->name = $name; $this->in = $this->doStart($this->name); }
/** * Application constructor */ public function __construct() { parent::__construct(); $this->_name = basename(get_called_class()); $this->_request = new HTTPRequest($this); $this->_response = new HTTPResponse($this); $this->_config = new Config($this); }
/** * Connection constructor * @param string $connectionString Connection string * @throws ConnectionFailedException */ public function __construct($connectionString) { parent::__construct(); $this->cnxString = $connectionString; $query = parse_url($this->connectionString, PHP_URL_QUERY); if (!empty($query)) { parse_str($query, $this->attributes); } $this->defaultFetchMode = is_null($a = $this->getAttribute(DB::ATTR_DEFAULT_FETCH_MODE)) ? new FetchMode(DB::FETCH_ASSOC) : unserialize($a); $this->connect(); }
/** * Fetch mode constructor * @param int $mode Actual fetch mode : combinaison of Result::FETCH_* constants * @param mixed $param For some modes, additionnal parameter * @param array $ctor_args For FETCH_CLASS mode : constructor arguments */ public function __construct($mode, &$param = null, array $ctor_args = array()) { parent::__construct(); $this->_mode = $mode; if ($this->hasMode(DB::FETCH_CLASS) and !$this->hasMode(DB::FETCH_CLASSTYPE) and !$this->hasMode(DB::FETCH_OBJ)) { $this->_classname = $param; $this->_ctor_args = $ctor_args; } elseif ($this->hasMode(DB::FETCH_INTO)) { $this->_obj =& $param; } elseif ($this->hasMode(DB::FETCH_COLUMN)) { $this->_col = $param; } elseif ($this->hasMode(DB::FETCH_CALLBACK)) { $this->_callback = $param; } }
/** * Component constructor * @param Application $app Parent application * @see Object */ public function __construct(Application $app) { parent::__construct(); $this->_app = $app; }
/** * Connection string builder constructor * @param string $driver Driver name (and database type) */ public function __construct($driver) { parent::__construct(); $this->setDriver($driver); }
/** * Constructor * @param Result $result Result set to iterate on */ public function __construct(Result $result) { parent::__construct(); $this->result = $result; }
/** * Statement constructor * @param Connection $cnx Parent connection */ public function __construct(Connection $cnx) { parent::__construct(); $this->cnx = $cnx; }
/** * Private constructor. Use Type::create() instead. * @param mixed|null $value * @throws TypeMismatchException * @throws InvalidValueException */ private function __construct($value = null) { parent::__construct(); $this->setValue($value); }