AuthorManager
class AuthorManager extends BaseManager
Core author manager
Methods
Helps paginate models using the query bulder. Bit more complicated than the native array method, but works better for larger data sets
Find author
Find first based on params
Find first content by ID
Find first item by given UUID
Find first instance by SRN
Create new author. Accepts: * slug * name * tagline * description * status * content
Update author. Accepts: * slug * name * tagline * description * status * content
Remove author. This does not remove associated children
No description
Details
in BaseManager at line line 23
object
save(object $obj)
Save handler, because DRY
in BaseManager at line line 60
Paginator
getPaginator(integer $page = 1, integer $limit = 50)
Helps paginate models using the query bulder. Bit more complicated than the native array method, but works better for larger data sets
Because it's based on Phalcon's QueryBuilder, it supports a fluent filtering interface:
$manager = $this->foo_manager; $items = $manager->getPaginator(1, 20) ->orderBy('created_at desc') ->where('name = :name:', array('name' => $name)) ->andWhere('type = :type:', array('type' => $type)) ->paginate(); echo json_encode($items);
in BaseManager at line line 80
boolean
restDelete(number $id)
Delete an object with rest
in BaseManager at line line 103
restCreate(array $data)
Create a new object
in BaseManager at line line 117
restUpdate(int $id, array $data)
Update an existing object
at line line 23
mixed
find(mixed $parameters = null)
Find author
at line line 33
mixed
findFirst(mixed $params = null)
Find first based on params
at line line 43
mixed
findFirstById(mixed $params = null)
Find first content by ID
at line line 53
object
findFirstByUuid(string $uuid)
Find first item by given UUID
at line line 63
Author
findFirstBySrn(string $srn)
Find first instance by SRN
at line line 84
Author
create(array $input)
Create new author. Accepts: * slug * name * tagline * description * status * content
at line line 158
Author
update(int $id, array $input)
Update author. Accepts: * slug * name * tagline * description * status * content
Keep in mind Content is overwritten, not added to existing collection
at line line 236
boolean
delete(integer $id)
Remove author. This does not remove associated children