Documentation

Shop_Compare_Controller extends Core_Servant_Properties
in package

Shop_Compare_Controller

Доступные методы:

  • shop_item_id($id) идентификатор товара
  • siteuser_id($id) идентификатор пользователя сайта
Tags
subpackage

Shop

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

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

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

get()

Get item from compare

public get() : object
Tags
hostcms-event

Shop_Compare_Controller.onBeforeGet

hostcms-event

Shop_Compare_Controller.onAfterGet

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
hostcms-event

Shop_Compare_Controller.onBeforeMoveTemporaryCompare

hostcms-event

Shop_Compare_Controller.onAfterMoveTemporaryCompare

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

_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

Return values
array<string|int, mixed>

Search results