- Symphony 2.3.1
-
› assets
11 -
› boot
9 -
› core
22 -
› cryptography
4 -
› email-gateways
3 -
› interface
6 -
› toolkit
72 -
› Unknown
38 - Delegates91
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class AuthorManager
class.authormanager.php #13The AuthorManager
class is responsible for managing all Author objects
in Symphony. Unlike other Manager objects, Authors are stored in the
database in tbl_authors
and not on the file system. CRUD methods are
implemented to allow Authors to be created (add), read (fetch), updated
(edit) and deleted (delete).
Methods
static boolean activateAuthToken(
$author_id)
This function will allow an Author to sign into Symphony by using their authentication token as well as username/password.
Parameters
static integer|boolean add(
$fields)
Given an associative array of fields, insert them into the database returning the resulting Author ID if successful, or false if there was an error
Parameters
Returns
Returns an Author ID of the created Author on success, false otherwise.
static boolean deactivateAuthToken(
$author_id)
This function will remove the ability for an Author to sign into Symphony by using their authentication token
Parameters
static boolean delete(
$id)
Given an Author ID, delete an Author from Symphony.
Parameters
static boolean edit(
$id, $fields)
Given an Author ID and associative array of fields, update an existing Author
row in the tbl_authors
database table. Returns boolean for success/failure
Parameters
static array fetch(
$sortby, $sortdirection, $limit, $start, $where, $joins)
The fetch method returns all Authors from Symphony with the option to sort or limit the output. This method returns an array of Author objects.
Parameters
Returns
An array of Author objects. If no Authors are found, an empty array is returned.
static mixed fetchByID(
$id)
Returns Author's that match the provided ID's with the option to
sort or limit the output. This function will search the
AuthorManager::$_pool
for Authors first before querying tbl_authors
Parameters
Returns
If $id
is an integer, the result will be an Author object, otherwise an array of Author objects will be returned. If no Authors are found, or no $id
is given, null
is returned.
static Author|null fetchByUsername(
$username)
Returns an Author by Username. This function will search the
AuthorManager::$_pool
for Authors first before querying tbl_authors
Parameters
Returns
If an Author is found, an Author object is returned, otherwise null.