class SstsManager extends BaseManager

Core ssts manager

Methods

object
save(object $obj)

Save handler, because DRY

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

boolean
restDelete(number $id)

Delete an object with rest

restCreate(array $data)

Create a new object

restUpdate(int $id, array $data)

Update an existing object

mixed
find(mixed $parameters = null)

Find ssts

mixed
findFirst(mixed $params = null)

Find first based on params

mixed
findFirstById(mixed $params = null)

Find first content by ID

object
findFirstByUuid(string $uuid)

Find first item by given UUID

findFirstBySrn(string $srn)

Find first instance by SRN

SSTS
create(array $input)

Create new SSTS. Accepts: * slug * name * status * content

update(int $id, array $input)

Update ssts. Accepts: * slug * name * status * content

boolean
delete(integer $id)

Remove ssts. This does not remove associated children

importFromJSON($json)

No description

Details

in BaseManager at line line 23
object save(object $obj)

Save handler, because DRY

Parameters

object $obj Model to be saved

Return Value

object Model

Exceptions

Exception Json encoded string of validation errors

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);

Parameters

integer $page Current page
integer $limit Per page limit

Return Value

Paginator

in BaseManager at line line 80
boolean restDelete(number $id)

Delete an object with rest

Parameters

number $id

Return Value

boolean

Exceptions

Exception

in BaseManager at line line 103
restCreate(array $data)

Create a new object

Parameters

array $data

in BaseManager at line line 117
restUpdate(int $id, array $data)

Update an existing object

Parameters

int $id
array $data

at line line 23
mixed find(mixed $parameters = null)

Find ssts

Parameters

mixed $parameters

Return Value

mixed

at line line 33
mixed findFirst(mixed $params = null)

Find first based on params

Parameters

mixed $params

Return Value

mixed

at line line 43
mixed findFirstById(mixed $params = null)

Find first content by ID

Parameters

mixed $params

Return Value

mixed

at line line 53
object findFirstByUuid(string $uuid)

Find first item by given UUID

Parameters

string $uuid

Return Value

object ContentModel

at line line 63
Ssts findFirstBySrn(string $srn)

Find first instance by SRN

Parameters

string $srn SRN

Return Value

Ssts

at line line 82
SSTS create(array $input)

Create new SSTS. Accepts: * slug * name * status * content

Parameters

array $input SSTS data

Return Value

SSTS

at line line 118
Ssts update(int $id, array $input)

Update ssts. Accepts: * slug * name * status * content

Keep in mind Content is overwritten, not added to existing collection

Parameters

int $id SSTS ID
array $input Ssts data

Return Value

Ssts

at line line 151
boolean delete(integer $id)

Remove ssts. This does not remove associated children

Parameters

integer $id SSTS id

Return Value

boolean

Exceptions

Exception if unable to load ssts

at line line 171
importFromJSON($json)

Parameters

$json