$_params
$_params :
This is the Rdo ORM implementation of the Sesha Driver.
Required values for $params:
'db' The Horde_Db adapterCopyright 2003-2017 Horde LLC (http://www.horde.org/) Based on the original Sql driver Copyright 2004-2007 Andrew Coleman mercury@appisolutions.net
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Summary
Methods Properties Constants __construct()
fetch()
delete()
add()
modify()
getCategory()
getCategories()
getProperties()
getProperty()
updateCategory()
addCategory()
deleteCategory()
categoryExists()
updateProperty()
addProperty()
deleteProperty()
getPropertiesForCategories()
setPropertiesForCategory()
clearPropertiesForCategory()
getPropertiesForStock()
getValuesForStock()
clearPropertiesForStock()
updatePropertiesForStock()
updateCategoriesForStock()
findStock()
No public properties found No constants found No protected methods found $_params
$_stock
$_db
$_mappers
N/A No private methods found No private properties found N/A
fetch(integer $stock_id) : \Sesha_Entity_Stock
This function retrieves a single stock item from the database.
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
addCategory(array $info) : \Sesha_Entity_Category
Adds a new category for classifying inventory.
array | $info | The new category's attributes. |
The category 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. |