Methods summary
public
Charcoal\Source\AbstractSource
|
|
public
Charcoal\Model\ModelInterface
|
|
public
Charcoal\Source\StorableInterface
|
|
public
array
|
|
public
mixed
|
#
saveItem( Charcoal\Source\StorableInterface $item )
Save an item (create a new row) in storage.
Save an item (create a new row) in storage.
Parameters
- $item
- The object to save.
Returns
mixed The created item ID, or false in case of an error.
|
public
boolean
|
#
updateItem( Charcoal\Source\StorableInterface $item, array $properties = null )
Update an item in storage.
Update an item in storage.
Parameters
- $item
- The object to update.
- $properties
- The list of properties to update, if not all.
Returns
boolean Success / Failure
|
public
boolean
|
#
deleteItem( Charcoal\Source\StorableInterface $item = null )
Delete an item from storage
Delete an item from storage
Parameters
- $item
- Optional item to delete. If none, the current model object will be used.
Returns
boolean Success / Failure
|
public
ColelectionLoader
|
#
setProperties( array $properties )
Parameters
- $properties
- The properties.
Returns
ColelectionLoader Chainable
|
public
array
|
|
public
CollectionLoader
|
#
addProperty( string $property )
Parameters
- $property
- Property ident.
Returns
CollectionLoader Chainable
|
public
Collection
|
#
setFilters( array $filters )
Parameters
Returns
Collection Chainable
|
public
array
|
|
public
CollectionLoader
|
#
addFilter( string|array|Charcoal\Source\Filter $param, mixed $val = null, array $options = null )
Add a collection filter to the loader.
Add a collection filter to the loader.
Parameters
- $param
- The filter parameter. May the "filter property" or an array / object.
- $val
- Optional. Val, only used if the first argument is a string.
- $options
- Optional. Options, only used if the first argument is a string.
Returns
CollectionLoader (Chainable)
|
public
CollectionLoader
|
#
setOrders( array $orders )
Parameters
Returns
CollectionLoader Chainable
|
public
array
|
|
public
CollectionLoader
|
#
addOrder( string|array|Charcoal\Source\Order $param, string $mode = 'asc', array $options = null )
Parameters
- $param
- The order parameter. May the "order property" or an array / object.
- $mode
- Optional. Mode, only used if the first argument is a string.
- $options
- Optional. Options, only user if the first argument is a string.
Returns
CollectionLoader Chainable
|
public
CollectionLoader
|
#
setPage( integer $page )
Parameters
- $page
- The page number. Starts with 0.
Returns
CollectionLoader Chainable
|
public
integer
|
|
public
CollectionLoader
|
#
setNumPerPage( integer $num )
Parameters
- $num
- The number of item to retrieve per page.
Returns
CollectionLoader Chainable
|
public
integer
|
|