PHP 클래스 Sesha_Driver, horde

Copyright 2004-2007 Andrew Coleman Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
저자: Andrew Coleman ([email protected])
저자: Ralf Lang ([email protected])
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_params
$_stock array Variable holding the items in the inventory.

공개 메소드들

메소드 설명
__construct ( $params = [] )
add ( array $stock ) : Sesha_Entity_Stock This will add a new item to the inventory.
addCategory ( array $info ) : integer Adds a new category for classifying inventory.
addProperty ( array $info ) : Sesha_Entity_Property Adds a new property to the storage backend.
categoryExists ( string $category ) : boolean Determines if a category exists in the storage backend.
clearPropertiesForCategory ( integer $category_id ) : integer Removes all properties for a specified category.
clearPropertiesForStock ( integer $stock_id, array $categories = [] ) : integer Removes categories from a particular stock item.
delete ( integer $stock_id ) : boolean Removes a stock entry from the backend. Also removes all related category and property information.
deleteCategory ( integer $category_id ) : integer Deletes a category.
deleteProperty ( integer $property_id ) : integer Deletes a property from the storage backend.
fetch ( integer $stock_id ) : Sesha_Entity_Stock This function retrieves a single stock item from the backend.
findStock ( $filters = [] ) : array Inventory search
getCategories ( integer $stock_id = null, array $category_ids = null ) : array This function returns all the categories matching an id or category list.
getCategory ( integer | array $category_id ) : Sesha_Entity_Category This will return the category found matching a specific id.
getProperties ( array $property_ids = [] ) : array This will find all the available properties matching a specified IDs.
getPropertiesForCategories ( array $categories = [] ) : mixed This will return a set of properties for a set of specified categories.
getPropertiesForStock ( integer $stock_id ) : array Returns a set of properties for a particular stock ID number.
getProperty ( integer $property_id ) : mixed Finds the first matching property for a specified property ID.
getValuesForStock ( integer $stock_id ) : array Returns a set of Value Objects for a particular stock ID number.
modify ( $stock_id, array $stock ) : boolean This function will modify a pre-existing stock entry with new values.
setPropertiesForCategory ( integer $category_id, array $properties = [] ) Updates a category with a set of properties.
updateCategoriesForStock ( integer $stock_id, array $categories = [] ) Updates the set of categories for a specified stock item.
updateCategory ( array $info ) : integer Updates the attributes stored by a category.
updatePropertiesForStock ( integer $stock_id, array $properties = [] ) Updates the set of properties for a particular stock item.
updateProperty ( array $info ) : Sesha_Inventory_Property Updates a property with new attributes.

메소드 상세

__construct() 공개 메소드

public __construct ( $params = [] )

add() 추상적인 공개 메소드

This will add a new item to the inventory.
abstract public add ( array $stock ) : Sesha_Entity_Stock
$stock array A hash of values for the stock item.
리턴 Sesha_Entity_Stock The newly added item or false.

addCategory() 추상적인 공개 메소드

Adds a new category for classifying inventory.
abstract public addCategory ( array $info ) : integer
$info array The new category's attributes.
리턴 integer The ID of the new of the category on success

addProperty() 추상적인 공개 메소드

Adds a new property to the storage backend.
abstract public addProperty ( array $info ) : Sesha_Entity_Property
$info array Array with new property values.
리턴 Sesha_Entity_Property

categoryExists() 추상적인 공개 메소드

Determines if a category exists in the storage backend.
abstract public categoryExists ( string $category ) : boolean
$category string The string representation of the category to find.
리턴 boolean True on success; false otherwise.

clearPropertiesForCategory() 추상적인 공개 메소드

Removes all properties for a specified category.
abstract public clearPropertiesForCategory ( integer $category_id ) : integer
$category_id integer The numeric ID of the category to update.
리턴 integer The number of deleted properties

clearPropertiesForStock() 추상적인 공개 메소드

Removes categories from a particular stock item.
abstract public clearPropertiesForStock ( integer $stock_id, array $categories = [] ) : integer
$stock_id integer The numeric ID of the stock item to update.
$categories array The array of categories to remove.
리턴 integer the number of categories removed

delete() 추상적인 공개 메소드

Removes a stock entry from the backend. Also removes all related category and property information.
abstract public delete ( integer $stock_id ) : boolean
$stock_id integer The ID of the item to delete.
리턴 boolean True on success

deleteCategory() 추상적인 공개 메소드

Deletes a category.
abstract public deleteCategory ( integer $category_id ) : integer
$category_id integer The numeric ID of the category to delete. Also accepts Sesha_Entity_Category
리턴 integer The number of categories deleted

deleteProperty() 추상적인 공개 메소드

Deletes a property from the storage backend.
abstract public deleteProperty ( integer $property_id ) : integer
$property_id integer The numeric ID of the property to delete. Also accepts a Sesha_Inventory_Property object
리턴 integer Number of objects deleted.

fetch() 추상적인 공개 메소드

This function retrieves a single stock item from the backend.
abstract public fetch ( integer $stock_id ) : Sesha_Entity_Stock
$stock_id integer The numeric ID of the stock item to fetch.
리턴 Sesha_Entity_Stock a stock item

findStock() 추상적인 공개 메소드

Inventory search
abstract public findStock ( $filters = [] ) : array
리턴 array List of Stock items

getCategories() 추상적인 공개 메소드

This function returns all the categories matching an id or category list.
abstract public getCategories ( integer $stock_id = null, array $category_ids = null ) : array
$stock_id integer The stock ID of categories to fetch. Overrides category_ids
$category_ids array The numeric IDs of the categories to find. If both $stock_id and $category_ids are null, all categories are returned
리턴 array The list of matching categories

getCategory() 추상적인 공개 메소드

This will return the category found matching a specific id.
abstract public getCategory ( integer | array $category_id ) : Sesha_Entity_Category
$category_id integer | array The integer ID or key => value hash of the category to find.
리턴 Sesha_Entity_Category The category on success

getProperties() 추상적인 공개 메소드

This will find all the available properties matching a specified IDs.
abstract public getProperties ( array $property_ids = [] ) : array
$property_ids array The numeric ID of properties to find. Matches all properties when null.
리턴 array matching properties on success

getPropertiesForCategories() 추상적인 공개 메소드

This will return a set of properties for a set of specified categories.
abstract public getPropertiesForCategories ( array $categories = [] ) : mixed
$categories array The set of categories to fetch properties.
리턴 mixed An array of properties on success

getPropertiesForStock() 추상적인 공개 메소드

Returns a set of properties for a particular stock ID number.
abstract public getPropertiesForStock ( integer $stock_id ) : array
$stock_id integer The numeric ID of the stock to find the properties for.
리턴 array of Sesha_Inventory_Property objects

getProperty() 추상적인 공개 메소드

Finds the first matching property for a specified property ID.
abstract public getProperty ( integer $property_id ) : mixed
$property_id integer The numeric ID of properties to find.
리턴 mixed The specified property on success

getValuesForStock() 추상적인 공개 메소드

Returns a set of Value Objects for a particular stock ID number.
abstract public getValuesForStock ( integer $stock_id ) : array
$stock_id integer The numeric ID of the stock to find the properties for. You can also pass a Sesha_Entity_Stock item
리턴 array the list of Sesha_Entity_Value objects

modify() 추상적인 공개 메소드

This function will modify a pre-existing stock entry with new values.
abstract public modify ( $stock_id, array $stock ) : boolean
$stock array The hash of values for the inventory item.
리턴 boolean True on success.

setPropertiesForCategory() 추상적인 공개 메소드

Updates a category with a set of properties.
abstract public setPropertiesForCategory ( integer $category_id, array $properties = [] )
$category_id integer The numeric ID of the category to update.
$properties array An array of property ID's to add.

updateCategoriesForStock() 추상적인 공개 메소드

Updates the set of categories for a specified stock item.
abstract public updateCategoriesForStock ( integer $stock_id, array $categories = [] )
$stock_id integer The numeric stock ID to update.
$categories array The array of categories to change.

updateCategory() 추상적인 공개 메소드

Updates the attributes stored by a category.
abstract public updateCategory ( array $info ) : integer
$info array Updated category attributes.
리턴 integer Number of objects updated.

updatePropertiesForStock() 추상적인 공개 메소드

Updates the set of properties for a particular stock item.
abstract public updatePropertiesForStock ( integer $stock_id, array $properties = [] )
$stock_id integer The numeric ID of the stock to update.
$properties array The hash of properties to update.

updateProperty() 추상적인 공개 메소드

Updates a property with new attributes.
abstract public updateProperty ( array $info ) : Sesha_Inventory_Property
$info array Array with updated property values.
리턴 Sesha_Inventory_Property The changed Sesha_Inventory_Property object.

프로퍼티 상세

$_params 보호되어 있는 프로퍼티

protected $_params

$_stock 보호되어 있는 프로퍼티

Variable holding the items in the inventory.
protected array $_stock
리턴 array