예제 #1
0
 /**
  * 
  * @param array $config
  */
 public function __construct(array $config = [])
 {
     $this->properties['pdo'] = NULL;
     $this->properties['dsn_prefix'] = NULL;
     $this->properties['host'] = NULL;
     $this->properties['port'] = -1;
     $this->properties['db_name'] = NULL;
     $this->properties['unix_socket'] = NULL;
     /**
      * @var string the charset used for database connection. The property is only used
      * for MySQL, MariaDB and PostgreSQL databases. Defaults to NULL, meaning using default charset
      * as specified by the database.
      *
      * Note that if you're using GBK or BIG5 then it's highly recommended to
      * update to PHP 5.3.6+ and to specify charset via DSN like
      * 'mysql:dbname=mydatabase;host=127.0.0.1;charset=GBK;'.
      */
     $this->properties['charset'] = 'utf8';
     /**
      * @var boolean whether to turn on prepare emulation. Defaults to FALSE, meaning PDO
      * will use the native prepare support if available. For some databases (such as MySQL),
      * this may need to be set TRUE so that PDO can emulate the prepare support to bypass
      * the buggy native prepare support. Note, this property is only effective for PHP 5.1.3 or above.
      * The default value is NULL, which will not change the ATTR_EMULATE_PREPARES value of PDO.
      */
     $this->properties['emulate_prepare'] = FALSE;
     $this->properties['fetch_mode'] = \PDO::FETCH_ASSOC;
     $this->properties['username'] = NULL;
     $this->properties['password'] = NULL;
     $this->properties['options'] = NULL;
     $this->properties['table_prefix'] = '';
     $this->properties['last_insert_id'] = -1;
     parent::__construct($config);
 }
예제 #2
0
 public function __construct(array $config = [])
 {
     $this->properties['db'] = NULL;
     $this->properties['permissions_manager'] = NULL;
     $this->properties['table_name'] = '#__';
     $this->properties['map_table_name'] = '#__';
     parent::__construct($config);
 }
 public function __construct(array $config = [])
 {
     $this->properties['db'] = NULL;
     $this->properties['users'] = NULL;
     $this->properties['groups'] = NULL;
     $this->properties['http_requests'] = NULL;
     $this->properties['menus'] = NULL;
     parent::__construct($config);
 }
예제 #4
0
 public function __construct(array $config = [])
 {
     $this->properties['loggerObject'] = null;
     $this->properties['logLevel'] = "";
     $this->properties['message'] = "";
     $this->properties['context'] = [];
     $this->properties['microtime'] = "";
     $this->properties['timestamp'] = "";
     $this->properties['datetime'] = "";
     $this->properties['continue'] = true;
     $this->properties['eventHandled'] = false;
     $this->properties['results'] = null;
     parent::__construct($config);
 }
예제 #5
0
 /**
  * 
  * @param array $config
  */
 public function __construct(array $config = [])
 {
     $this->properties['db'] = NULL;
     $this->properties['query_type'] = self::QUERY_TYPE_SELECT;
     $this->properties['select'] = [];
     // field names to select
     $this->properties['insert'] = NULL;
     // table name
     $this->properties['update'] = NULL;
     // table name
     $this->properties['delete'] = NULL;
     // table name
     $this->properties['set'] = [];
     // field_names => field_values for update
     $this->properties['values'] = [];
     // for insert
     $this->properties['from'] = [];
     // table names for select
     $this->properties['inner_join'] = NULL;
     // string
     $this->properties['left_join'] = NULL;
     // string
     $this->properties['where'] = NULL;
     // where conditions, string
     $this->properties['group_by'] = [];
     //
     $this->properties['having'] = NULL;
     // string, eg. HAVING aggregate_function(column_name) operator value;
     $this->properties['order_by'] = [];
     // string[], eg. ORDER BY column_name ASC|DESC, column_name ASC|DESC;
     $this->properties['limit'] = NULL;
     // int
     $this->properties['offset'] = NULL;
     // int
     $this->properties['parameters'] = [];
     // ...values to bind for prepared statments, only named parameters.
     parent::__construct($config);
 }
예제 #6
0
 public function __construct(array $config = [])
 {
     $this->properties['throwExceptionOnUnhandledEvent'] = false;
     parent::__construct($config);
 }