- Symphony 2.2.2
-
› assets
11 -
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
67 -
› Unknown
33 - Delegates87
- Deprecated30
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
Manager AuthorManager
public class AuthorManager extends Manager
class.authormanager.php #15The AuthorManager class is responsible for managing all Author objects in Symphony. Unlike other Manager objects, Authors are stored in the database, 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 AuthorID 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)
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, null is returned.
static mixed fetchByID(
$id, $sortby, $sortdirection, $limit, $start)
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
was 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.