Bluz\Auth\AbstractTable
Abstract class for Auth\Table
- Author: Anton Shevchuk
Synopsis
- // 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';
- // Inherited members from Table
- protected $name;
- protected $model;
- protected array $meta;
- protected string $select;
- protected $primary;
- protected $sequence;
- protected $rowClass;
- // methods
- public static AbstractRow getAuthRow()
- // Inherited methods from Table
- public void init()
- public static AbstractTable getInstance()
- public Table setSelectQuery()
- public string getSelectQuery()
- public array getPrimaryKey()
- public string getName()
- public string getModel()
- public static array getMeta()
- public static array getColumns()
- public static array filterColumns()
- public static array fetch()
- public static array fetchAll()
- public static array find()
- public static Row findRow()
- public static array findWhere()
- public static Row findRowWhere()
- public static Select select()
- public static Row create()
- public static string|null insert()
- public static integer update()
- public static integer delete()
- public void linkTo()
- public void linkToMany()
Hierarchy
Extends
Constants
Name | Value |
---|---|
TYPE_ACCESS | 'access' |
TYPE_REQUEST | 'request' |
PROVIDER_COOKIE | '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
- getAuthRow() — Get AuthRow
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
-
2017-07-27T14:27:09+00:00 (commit #88b4076)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Updated Auth logic
-
2017-06-30T08:36:40+00:00 (commit #2259ecf)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Fixed comments style
-
2017-04-21T15:35:58+00:00 (commit #f123cc6)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `__isset()` method to Nil class
-
2017-04-21T15:28:30+00:00 (commit #f0410e7)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Replace `join` with `implode`
-
2017-04-21T13:24:35+00:00 (commit #3b25a3d)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Small update for codestyle
-
2017-02-15T16:09:44+00:00 (commit #0fc0c8b)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Updated coveralls config
-
2017-02-13T10:14:18+00:00 (commit #43dbf55)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Rollback to `getCount()` method
-
2017-01-30T13:15:49+00:00 (commit #fd5d943)
Author: Anton (AntonShevchuk@gmail.com) / Commiter: GitHub (AntonShevchuk@gmail.com)
Merge pull request #395 from AntonShevchuk/master Added `AttachmentResponse`
-
2017-01-30T12:38:53+00:00 (commit #0ab8691)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `AttachmentResponse` Added `attachment($file)` helper for `Controller`