Shop_Compare_Controller
extends Core_Servant_Properties
in package
Shop_Compare_Controller
Доступные методы:
- shop_item_id($id) идентификатор товара
- siteuser_id($id) идентификатор пользователя сайта
Tags
Table of Contents
- $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
- __construct() : mixed
- Constructor.
- add() : Shop_Compare_Controller
- Add item into compare
- addAllowedProperties() : self
- Add additional allowed properties
- addAllowedProperty() : self
- Add additional allowed property
- clear() : Shop_Compare_Controller
- Clear compare operation's options
- clearSessionCompare() : Shop_Compare_Controller
- Clear session compare
- delete() : Shop_Compare_Controller
- Delete item from compare
- get() : object
- Get item from compare
- getAll() : array<string|int, mixed>
- Get all goods in the compare
- instance() : object
- Register an existing instance as a singleton.
- moveTemporaryCompare() : self
- Move goods from session to database
- set() : self
- Run when writing data to inaccessible properties
- setUnlimitedProperties() : self
- Set unlimitedProperties
- update() : Shop_Compare_Controller
- Update item in compare
- _getAllFromDb() : array<string|int, mixed>
- Get all compares from database
- _getAllFromSession() : array<string|int, mixed>
- Get all compares 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')
$_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
Return values
mixed —add()
Add item into compare
public
add() : Shop_Compare_Controller
Tags
Return values
Shop_Compare_Controller —addAllowedProperties()
Add additional allowed properties
public
addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
- $array : array<string|int, mixed>
-
array of properties' names
Return values
self —addAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
self —clear()
Clear compare operation's options
public
clear() : Shop_Compare_Controller
Tags
Return values
Shop_Compare_Controller —clearSessionCompare()
Clear session compare
public
clearSessionCompare() : Shop_Compare_Controller
Return values
Shop_Compare_Controller —delete()
Delete item from compare
public
delete() : Shop_Compare_Controller
Tags
Return values
Shop_Compare_Controller —get()
Get item from compare
public
get() : object
Tags
Return values
object —getAll()
Get all goods in the compare
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
object —moveTemporaryCompare()
Move goods from session to database
public
moveTemporaryCompare(Shop_Model $oShop) : self
Parameters
- $oShop : Shop_Model
-
shop
Tags
Return values
self —set()
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
self —setUnlimitedProperties()
Set unlimitedProperties
public
setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
- $value : bool = TRUE
-
default TRUR
Return values
self —update()
Update item in compare
public
update() : Shop_Compare_Controller
Tags
Return values
Shop_Compare_Controller —_getAllFromDb()
Get all compares 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 compares from session
protected
_getAllFromSession(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
-
shop