$_params
$_params :
This is the base Driver class for the Sesha application.
Copyright 2004-2007 Andrew Coleman mercury@appisolutions.net Copyright 2011-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
fetch(integer $stock_id) : \Sesha_Entity_Stock
This function retrieves a single stock item from the backend.
integer | $stock_id | The numeric ID of the stock item to fetch. |
a stock item
add(array $stock) : \Sesha_Entity_Stock
This will add a new item to the inventory.
array | $stock | A hash of values for the stock item. |
The newly added item or false.
getCategory(integer|array $category_id) : \Sesha_Entity_Category
This will return the category found matching a specific id.
integer|array | $category_id | The integer ID or key => value hash of the category to find. |
The category on success
getCategories(integer $stock_id = null, integer $category_ids = null) : array
This function returns all the categories matching an id or category list.
integer | $stock_id | The stock ID of categories to fetch. Overrides category_ids |
integer | $category_ids | The numeric IDs of the categories to find. If both $stock_id and $category_ids are null, all categories are returned |
The list of matching categories
getProperties(array $property_ids = array()) : array
This will find all the available properties matching a specified IDs.
array | $property_ids | The numeric ID of properties to find. Matches all properties when null. |
matching properties on success
addProperty(array $info) : \Sesha_Entity_Property
Adds a new property to the storage backend.
array | $info | Array with new property values. |
getPropertiesForCategories(array $categories = array()) : mixed
This will return a set of properties for a set of specified categories.
array | $categories | The set of categories to fetch properties. |
An array of properties on success
getValuesForStock(integer $stock_id) : array
Returns a set of Value Objects for a particular stock ID number.
integer | $stock_id | The numeric ID of the stock to find the properties for. You can also pass a Sesha_Entity_Stock item |
the list of Sesha_Entity_Value objects
clearPropertiesForStock(integer $stock_id, array $categories = array()) : integer
Removes categories from a particular stock item.
integer | $stock_id | The numeric ID of the stock item to update. |
array | $categories | The array of categories to remove. |
the number of categories removed
updatePropertiesForStock(integer $stock_id, array $properties = array())
Updates the set of properties for a particular stock item.
integer | $stock_id | The numeric ID of the stock to update. |
array | $properties | The hash of properties to update. |