Shop_Favorite_Controller
extends Core_Servant_Properties
in package
Shop_Favorite_Controller
Доступные методы:
- shop_item_id($id) идентификатор товара
- siteuser_id($id) идентификатор пользователя сайта
Tags
Table of Contents
Properties
- $instance : mixed
- The singleton instances.
- $_allowedProperties : array<string|int, mixed>
- Allowed object properties
- $_propertiesValues : array<string|int, mixed>
- Properties values
- $_unlimitedProperties : bool
- Object has unlimited number of properties
Methods
- __construct() : mixed
- Constructor.
- add() : Shop_Favorite_Controller
- Add item into favorite
- addAllowedProperties() : self
- Add additional allowed properties
- addAllowedProperty() : self
- Add additional allowed property
- clear() : Shop_Favorite_Controller
- Clear favorite operation's options
- clearSessionFavorite() : Shop_Favorite_Controller
- Clear session favorite
- delete() : Shop_Favorite_Controller
- Delete item from favorite
- get() : object
- Get item from favorite
- getAll() : array<string|int, mixed>
- Get all goods in the favorite
- instance() : object
- Register an existing instance as a singleton.
- moveTemporaryFavorite() : self
- Move goods from session to database
- set() : self
- Run when writing data to inaccessible properties
- setUnlimitedProperties() : self
- Set unlimitedProperties
- update() : Shop_Favorite_Controller
- Update item in favorite
- _getAllFromDb() : array<string|int, mixed>
- Get all favorites from database
- _getAllFromSession() : array<string|int, mixed>
- Get all favorites from session
Properties
$instance
The singleton instances.
public
static mixed
$instance
= \NULL
$_allowedProperties
Allowed object properties
protected
array<string|int, mixed>
$_allowedProperties
= array('shop_item_id', 'siteuser_id', 'shop_favorite_list_id')
$_propertiesValues
Properties values
protected
array<string|int, mixed>
$_propertiesValues
= array()
$_unlimitedProperties
Object has unlimited number of properties
protected
bool
$_unlimitedProperties
= \FALSE
Methods
__construct()
Constructor.
public
__construct() : mixed
add()
Add item into favorite
public
add() : Shop_Favorite_Controller
Tags
Return values
Shop_Favorite_ControlleraddAllowedProperties()
Add additional allowed properties
public
addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
- $array : array<string|int, mixed>
-
array of properties' names
Return values
selfaddAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
selfclear()
Clear favorite operation's options
public
clear() : Shop_Favorite_Controller
Tags
Return values
Shop_Favorite_ControllerclearSessionFavorite()
Clear session favorite
public
clearSessionFavorite() : Shop_Favorite_Controller
Return values
Shop_Favorite_Controllerdelete()
Delete item from favorite
public
delete() : Shop_Favorite_Controller
Tags
Return values
Shop_Favorite_Controllerget()
Get item from favorite
public
get() : object
Tags
Return values
objectgetAll()
Get all goods in the favorite
public
getAll(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
-
shop
Return values
array<string|int, mixed>instance()
Register an existing instance as a singleton.
public
static instance() : object
Return values
objectmoveTemporaryFavorite()
Move goods from session to database
public
moveTemporaryFavorite(Shop_Model $oShop) : self
Parameters
- $oShop : Shop_Model
-
shop
Tags
Return values
selfset()
Run when writing data to inaccessible properties
public
set(string $property, string $value) : self
Parameters
- $property : string
-
property name
- $value : string
-
property value
Return values
selfsetUnlimitedProperties()
Set unlimitedProperties
public
setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
- $value : bool = TRUE
-
default TRUR
Return values
selfupdate()
Update item in favorite
public
update() : Shop_Favorite_Controller
Tags
Return values
Shop_Favorite_Controller_getAllFromDb()
Get all favorites from database
protected
_getAllFromDb(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
-
shop
Return values
array<string|int, mixed>_getAllFromSession()
Get all favorites from session
protected
_getAllFromSession(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
-
shop