Bluz\Auth\AbstractTable

Abstract class for Auth\Table

Synopsis

class AbstractTable extends Table {
  • // constants
  • const TYPE_ACCESS = 'access';
  • const TYPE_REQUEST = 'request';
  • const PROVIDER_COOKIE = 'cookie';
  • const PROVIDER_EQUALS = 'equals';
  • const PROVIDER_FACEBOOK = 'facebook';
  • const PROVIDER_GOOGLE = 'google';
  • const PROVIDER_LDAP = 'ldap';
  • const PROVIDER_TOKEN = 'token';
  • const PROVIDER_TWITTER = 'twitter';
  • // members
  • protected string $name = 'auth';
  • protected array $primary = ;
  • // methods
  • public static AbstractRow getAuthRow()
}

Hierarchy

Extends

Constants

Name Value
TYPE_ACCESS 'access'
TYPE_REQUEST 'request'
'cookie'
PROVIDER_EQUALS 'equals'
PROVIDER_FACEBOOK 'facebook'
PROVIDER_GOOGLE 'google'
PROVIDER_LDAP 'ldap'
PROVIDER_TOKEN 'token'
PROVIDER_TWITTER 'twitter'

Members

protected

  • $meta — array
  • $model — string
  • $name — string
  • $name — string
  • $primary — array
  • $primary — array
  • $rowClass — string
  • $select — string
  • $sequence — string

Methods

public

Inherited from Bluz\Db\Table

public

  • create() — Create Row instance
  • delete() — Deletes existing rows
  • fetch() — Fetching rows by SQL query
  • fetchAll() — Fetch all rows from table Be carefully with this method, can be very slow
  • filterColumns() — Filter columns for insert/update queries by table columns definition
  • find() — Fetches rows by primary key. The argument specifies one or more primary key value(s). To find multiple rows by primary key, the argument must be an array.
  • findRow() — Find row by primary key
  • findRowWhere() — Find row by where condition
  • findWhere() — Find rows by WHERE // WHERE alias = 'foo' Table::findWhere(['alias'=>'foo']); // WHERE alias = 'foo' OR 'alias' = 'bar' Table::findWhere(['alias'=>'foo'], ['alias'=>'bar']); // WHERE (alias = 'foo' AND userId = 2) OR ('alias' = 'bar' AND userId = 4) Table::findWhere(['alias'=>'foo', 'userId'=> 2], ['alias'=>'foo', 'userId'=>4]); // WHERE alias IN ('foo', 'bar') Table::findWhere(['alias'=> ['foo', 'bar']]);
  • getColumns() — Return names of table columns
  • getInstance() — Get Table instance
  • getMeta() — Return information about table columns
  • getModel() — Get model name
  • getName() — Get table name
  • getPrimaryKey() — Get primary key(s)
  • getSelectQuery() — Get select query
  • init() — Initialization hook.
  • insert() — Insert new record to table and return last insert Id
  • linkTo() — Setup relation "one to one" or "one to many"
  • linkToMany() — Setup relation "many to many" [table1-key] [table1_key-table2-table3_key] [table3-key]
  • select() — Prepare Db\Query\Select for current table: - predefine "select" section as "*" from current table - predefine "from" section as current table name and first letter as alias - predefine fetch type
  • setSelectQuery() — Set select query
  • update() — Updates existing rows

History