Mage_Core_Model_Resource_Abstract
in package
AbstractYes
Table of Contents
Properties
- $_commitCallbacks : array<string|int, mixed>
- Array of callbacks subscribed to commit transaction commit
Methods
- __construct() : mixed
- Main constructor
- addCommitCallback() : $this
- Subscribe some callback to transaction commit
- beginTransaction() : $this
- Start resource transaction
- commit() : $this
- Commit resource transaction
- formatDate() : string|null
- Format date to internal format
- isModuleEnabled() : bool
- mktime() : int
- Convert internal date to UNIX timestamp
- rollBack() : $this
- Roll back resource transaction
- _construct() : mixed
- _getReadAdapter() : AdapterInterface
- Retrieve connection for read data
- _getWriteAdapter() : AdapterInterface
- Retrieve connection for write data
- _prepareDataForTable() : array<string|int, mixed>
- Prepare data for passed table
- _prepareTableValueForSave() : mixed
- Prepare value for save
- _serializeField() : $this
- Serialize specified field in an object
- _unserializeField() : mixed
- Unserialize \Maho\DataObject field in an object
Properties
$_commitCallbacks
Array of callbacks subscribed to commit transaction commit
protected
static array<string|int, mixed>
$_commitCallbacks
= []
Methods
__construct()
Main constructor
public
__construct() : mixed
addCommitCallback()
Subscribe some callback to transaction commit
public
addCommitCallback(callable $callback) : $this
Parameters
- $callback : callable
Return values
$thisbeginTransaction()
Start resource transaction
public
beginTransaction() : $this
Return values
$thiscommit()
Commit resource transaction
public
commit() : $this
Return values
$thisformatDate()
Format date to internal format
public
formatDate(int|string|DateTime|bool|null $date[, bool $withTime = true ]) : string|null
since 26.5 Use Mage::app()->getLocale()->formatDateForDb() instead
Parameters
- $date : int|string|DateTime|bool|null
- $withTime : bool = true
Tags
Return values
string|nullisModuleEnabled()
public
isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
- $moduleName : string
- $helperAlias : string = 'core'
Return values
boolmktime()
Convert internal date to UNIX timestamp
public
mktime(string $str) : int
Parameters
- $str : string
Return values
introllBack()
Roll back resource transaction
public
rollBack() : $this
Return values
$this_construct()
protected
abstract _construct() : mixed
_getReadAdapter()
Retrieve connection for read data
protected
abstract _getReadAdapter() : AdapterInterface
Return values
AdapterInterface_getWriteAdapter()
Retrieve connection for write data
protected
abstract _getWriteAdapter() : AdapterInterface
Return values
AdapterInterface_prepareDataForTable()
Prepare data for passed table
protected
_prepareDataForTable(DataObject $object, string $table) : array<string|int, mixed>
Parameters
- $object : DataObject
- $table : string
Return values
array<string|int, mixed>_prepareTableValueForSave()
Prepare value for save
protected
_prepareTableValueForSave(mixed $value, string $type) : mixed
Parameters
- $value : mixed
- $type : string
_serializeField()
Serialize specified field in an object
protected
_serializeField(DataObject $object, string $field[, mixed $defaultValue = null ][, bool $unsetEmpty = false ]) : $this
Parameters
- $object : DataObject
- $field : string
- $defaultValue : mixed = null
- $unsetEmpty : bool = false
Return values
$this_unserializeField()
Unserialize \Maho\DataObject field in an object
protected
_unserializeField(DataObject $object, string $field[, mixed $defaultValue = null ]) : mixed
Parameters
- $object : DataObject
- $field : string
- $defaultValue : mixed = null