Siteuser_Model
extends Core_Entity
in package
Siteuser_Model
Tags
Table of Contents
- $address : mixed
- $cart : string
- Backend property
- $city : mixed
- $company : mixed
- $config : mixed
- ORM config
- $counterparty : string
- Backend property
- $country : mixed
- $favorite : string
- Backend property
- $fax : mixed
- $icq : mixed
- $img_list_affiliates : string
- Backend property
- $img_list_cashes : string
- Backend property
- $img_list_people_companies : string
- Backend property
- $name : mixed
- $patronymic : mixed
- $phone : mixed
- $postcode : mixed
- $representative : string
- Backend property
- $surname : mixed
- $timeline : string
- Backend property
- $website : mixed
- $_allowedTags : array<string|int, mixed>
- Allowed tags. If list of tags is empty, all tags will show.
- $_attachSessionToIp : mixed
- Attach session to IP
- $_attributes : array<string|int, mixed>
- Entity Attributes
- $_belongsTo : array<string|int, mixed>
- Belongs to relations
- $_changeCopiedName : bool
- Change copied name is necessary, default FALSE
- $_changedColumns : array<string|int, mixed>
- List of changed columns
- $_dataValues : array<string|int, mixed>
- data-values, e.g. dataMyValue
- $_forbiddenTags : array<string|int, mixed>
- Forbidden tags. If list of tags is empty, all tags will show.
- $_hasMany : array<string|int, mixed>
- One-to-many or many-to-many relations
- $_hasOne : array<string|int, mixed>
- One-to-one relations
- $_hasRevisions : mixed
- Has revisions
- $_marksDeleted : mixed
- Marks deleted entity
- $_modelColumns : array<string|int, mixed>
- List of columns in model with values
- $_modelName : mixed
- Model name, e.g. 'book' for 'Book_Model'
- $_nameColumn : string
- Column consist item's name
- $_oldFields : mixed
- $_preloadValues : array<string|int, mixed>
- List of preloaded values
- $_primaryKey : string
- Primary key
- $_propertyValues : array<string|int, mixed>
- Values of all properties of user
- $_queryBuilder : Core_QueryBuilder_Select
- Select query builder
- $_shortcodeTags : array<string|int, mixed>
- List of Shortcodes tags
- $_showXmlCompanies : bool
- Show siteuser companies data in XML
- $_showXmlMaillists : bool
- Show maillists data in XML
- $_showXmlPeople : bool
- Show siteuser people data in XML
- $_showXmlProperties : mixed
- Show properties in XML
- $_skipColumns : array<string|int, mixed>
- List of skipped columns from table
- $_sorting : array<string|int, mixed>
- Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
- $_tableColumns : array<string|int, mixed>
- List of columns in table
- $_tableName : mixed
- Table name, e.g. 'books' for 'Book_Model'
- $_typicalForbiddenTags : array<string|int, mixed>
- Typical forbidden tags.
- $_xmlSortPropertiesValues : mixed
- Sort properties values in XML
- __call() : mixed
- Triggered when invoking inaccessible methods in an object context
- __construct() : mixed
- Constructor.
- __isset() : mixed
- __set() : self
- Run when writing data to inaccessible properties
- activate() : self
- Change activity status to ON
- add() : self
- Add related object. If main object does not save, it will save.
- addAllowedTag() : self
- Add tag to allowed tags list
- addAttribute() : self
- Add entity attribute
- addEntities() : self
- Add children entities
- addEntity() : self
- Add a children entity
- addForbiddenTag() : self
- Add tag to forbidden tags list
- addForbiddenTags() : self
- Add tags to forbidden tags list
- addFriend() : self
- Add user to friend list
- addXmlTag() : self
- Add external tag for entity
- applyMarksDeleted() : self
- Apply markDeleted flag if is set
- attachSessionToIp() : mixed
- changeActive() : Siteuser_Model
- Change site user status
- changeCopiedName() : self
- Set if change copied name is necessary
- changed() : bool
- Check model has been changed.
- check() : self
- Check model values. If model has incorrect value, one will correct or call exception.
- chunk() : bool
- Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
- clear() : self
- Clear object
- clearEntities() : self
- Clear enities
- clearEntitiesAfterGetXml() : self
- Clear all entities after XML generation
- clearXmlTags() : mixed
- Clear external XML tags for entity.
- copy() : Core_Entity
- Copy object
- counterpartyBackend() : string
- Backend callback method
- create() : self
- Insert new object data into database
- createDir() : self
- Create directory for item
- delete() : Core_Entity
- Delete object from database
- deleteAll() : self
- Delete all object
- factory() : mixed
- Create and return an object of model
- find() : self
- Find object in database and load one. Use clear() before find() with conditions!
- findAll() : array<string|int, mixed>
- Find all objects
- getAllowedMaillists() : array<string|int, mixed>
- Список доступных пользователю рассылок 'Maillists'
- getBonuses() : array<string|int, mixed>
- Get siteuser bonuses
- getByLoginAndEmail() : Siteuser_Model|null
- Get user by login and email
- getByLoginAndPassword() : Siteuser_Model|null
- Get user by login and password
- getChangedData() : array<string|int, mixed>
- Get changed columns with values
- getClassName() : string
- Get Model CallsName
- getCount() : int|false
- Get count object
- getCurrent() : Siteuser_Model|null
- Get current user
- getDatabaseDriver() : string
- Get name of Database Driver
- getDataValues() : array<string|int, mixed>
- Get dataValues
- getDirHref() : string
- Get object directory href
- getDirPath() : string
- Get object directory path
- getEntities() : array<string|int, mixed>
- Get children entities
- getFieldIDs() : array<string|int, mixed>
- Get visible field's IDs
- getFields() : array<string|int, mixed>
- Get field's values
- getFirst() : null|Core_ORM
- Get fist entity, ordered by primary key
- getForbiddenTags() : array<string|int, mixed>
- Get forbidden tags list
- getLast() : null|Core_ORM
- Get last entity, ordered by primary key
- getLastActivity() : int
- Return number of seconds since last activity
- getMarksDeleted() : string
- Get column name for marks deleted
- getModelName() : string
- Get model name, e.g. 'book' for 'Book_Model'
- getName() : string
- Get entity name
- getNameColumn() : string
- Get Name Column
- getPath() : string
- Get path for files
- getPrimaryKey() : mixed
- Get primary key value
- getPrimaryKeyName() : string
- Get primary key name
- getPropertyValues() : array<string|int, mixed>
- Values of all properties of element
- getRelatedSite() : Site_Model|null
- Get Related Site
- getRelations() : array<string|int, mixed>
- Get $this->_relations
- getStdObject() : stdObject
- Get stdObject for entity and children entities
- getTableColumns() : array<string|int, mixed>
- Get tableColumns
- getTableColums() : array<string|int, mixed>
- Get table columns. Fix wrong method name
- getTableName() : string
- Get table name
- getTransactions() : array<string|int, mixed>
- Get all shop's transactions
- getTransactionsAmount() : float
- Get amount of all shop transactions
- getTrashDescription() : string
- Get entity description
- getXml() : string
- Get XML for entity and children entities
- getXmlTagName() : string
- Get tag name
- getXmlTags() : array<string|int, mixed>
- Get external XML tags for entity.
- indexing() : Search_Page
- Search indexation
- isCallable() : bool
- Verify that the contents of a variable can be called as a function
- isEmptyPrimaryKey() : bool
- Check is primary key NULL
- isOnline() : bool
- Is user online
- loginBackend() : string
- Backend callback method
- markDeleted() : self
- Mark entity as deleted
- merge() : self
- Merge siteuser with another one
- queryBuilder() : Core_QueryBuilder_Select
- Get query builder for select
- remove() : self
- Remove related object. If main object does not save, it will save.
- removeForbiddenTag() : self
- Remove tag from forbidden tags list
- removeFriend() : self
- Remove user from friend list
- save() : self
- Save object. Use self::update() or self::create()
- setCheck() : self
- Set _check flag
- setCurrent() : self
- Set user as current
- setDatabaseDriver() : mixed
- Set name of Database Driver
- setMarksDeleted() : self
- Set column name for marks deleted
- setRelations() : self
- Set $this->_relations
- setXmlTagName() : self
- Set name of XML node
- showXmlCompanies() : self
- Show siteuser companies in XML
- showXmlMaillists() : self
- Show maillist in XML
- showXmlPeople() : self
- Show siteuser people in XML
- showXmlProperties() : self
- Show properties in XML
- toArray() : array<string|int, mixed>
- Convert Object to Array
- undelete() : self
- Turn off deleted status
- unsetCurrent() : self
- Unset current user from session
- update() : self
- Update object data into database
- updateLastActivity() : self
- Update last activity
- _getCopiedName() : mixed
- Get the name of a new copied object
- _prepareData() : self
- Prepare entity and children entities
- _preparePropertyValue() : mixed
- Prepare Property Value
- getDatabase() : Core_DataBase
- Get Database
Properties
$address
public
mixed
$address
= \NULL
$cart
Backend property
public
string
$cart
= 0
$city
public
mixed
$city
= \NULL
$company
public
mixed
$company
= \NULL
$config
ORM config
public
static mixed
$config
= \NULL
$counterparty
Backend property
public
string
$counterparty
= \NULL
$country
public
mixed
$country
= \NULL
$favorite
Backend property
public
string
$favorite
= 0
$fax
public
mixed
$fax
= \NULL
$icq
public
mixed
$icq
= \NULL
$img_list_affiliates
Backend property
public
string
$img_list_affiliates
= 0
$img_list_cashes
Backend property
public
string
$img_list_cashes
= 0
$img_list_people_companies
Backend property
public
string
$img_list_people_companies
= \NULL
$name
public
mixed
$name
= \NULL
$patronymic
public
mixed
$patronymic
= \NULL
$phone
public
mixed
$phone
= \NULL
$postcode
public
mixed
$postcode
= \NULL
$representative
Backend property
public
string
$representative
= 0
$surname
public
mixed
$surname
= \NULL
$timeline
Backend property
public
string
$timeline
= 0
$website
public
mixed
$website
= \NULL
$_allowedTags
Allowed tags. If list of tags is empty, all tags will show.
protected
array<string|int, mixed>
$_allowedTags
= array()
$_attachSessionToIp
Attach session to IP
protected
mixed
$_attachSessionToIp
Tags
$_attributes
Entity Attributes
protected
array<string|int, mixed>
$_attributes
= array()
$_belongsTo
Belongs to relations
protected
array<string|int, mixed>
$_belongsTo
= array('siteuser_type' => array(), 'siteuser_status' => array(), 'crm_source' => array(), 'site' => array(), 'user' => array())
$_changeCopiedName
Change copied name is necessary, default FALSE
protected
bool
$_changeCopiedName
= \FALSE
$_changedColumns
List of changed columns
protected
array<string|int, mixed>
$_changedColumns
= array()
$_dataValues
data-values, e.g. dataMyValue
protected
array<string|int, mixed>
$_dataValues
= array()
$_forbiddenTags
Forbidden tags. If list of tags is empty, all tags will show.
protected
array<string|int, mixed>
$_forbiddenTags
= array('deleted', 'user_id', 'datetime', 'password')
$_hasMany
One-to-many or many-to-many relations
protected
array<string|int, mixed>
$_hasMany
= array(
'siteuser_group' => array('through' => 'siteuser_group_list'),
'siteuser_group_list' => array(),
// Реферралы пользователя
'siteuser_affiliate' => array(),
'siteuser_identity' => array(),
'shop_cart' => array(),
'shop_favorite_list' => array(),
'shop_favorite' => array(),
'shop_order' => array(),
'shop_siteuser_transaction' => array(),
'maillist' => array('through' => 'maillist_siteuser'),
'maillist_siteuser' => array(),
'maillist_fascicle_log' => array(),
'maillist_unsubscriber' => array(),
'forum_topic_post' => array(),
'forum_topic_view' => array(),
'forum_topic_subscriber' => array(),
'forum_siteuser_count' => array(),
'helpdesk_ticket' => array(),
'counter_page' => array(),
'message_topics_by_sender' => array('model' => 'Message_Topic', 'foreign_key' => 'sender_siteuser_id'),
'message_topics_by_recipient' => array('model' => 'Message_Topic', 'foreign_key' => 'recipient_siteuser_id'),
'siteuser_relationship' => array(),
'siteuser_relationship_recipient' => array('foreign_key' => 'recipient_siteuser_id', 'model' => 'Siteuser_Relationship'),
'siteuser' => array('through' => 'siteuser_relationship', 'dependent_key' => 'recipient_siteuser_id'),
'friend' => array('through' => 'siteuser_relationship', 'dependent_key' => 'recipient_siteuser_id', 'model' => 'Siteuser', 'foreign_key' => 'siteuser_id'),
'siteuser_person' => array(),
'siteuser_company' => array(),
'siteuser_user' => array(),
'event' => array('through' => 'event_user'),
'event_siteuser' => array(),
'user' => array('through' => 'siteuser_user'),
'shop_discountcard' => array(),
'lead' => array(),
'siteuser_email' => array(),
)
$_hasOne
One-to-one relations
protected
array<string|int, mixed>
$_hasOne
= array(
// Реферралом какого пользователя текущий является (кто является для него аффилиатом)
'affiliate' => array('model' => 'Siteuser', 'foreign_key' => 'referral_siteuser_id', 'through' => 'siteuser_affiliate', 'dependent_key' => 'siteuser_id'),
'siteuser_affiliate' => array('foreign_key' => 'referral_siteuser_id'),
)
$_hasRevisions
Has revisions
protected
mixed
$_hasRevisions
= \FALSE
$_marksDeleted
Marks deleted entity
protected
mixed
$_marksDeleted
= 'deleted'
$_modelColumns
List of columns in model with values
protected
array<string|int, mixed>
$_modelColumns
= array()
$_modelName
Model name, e.g. 'book' for 'Book_Model'
protected
mixed
$_modelName
= \NULL
$_nameColumn
Column consist item's name
protected
string
$_nameColumn
= 'login'
$_oldFields
protected
static mixed
$_oldFields
= array('name', 'surname', 'patronymic', 'company', 'phone', 'website', 'country', 'city', 'address')
$_preloadValues
List of preloaded values
protected
array<string|int, mixed>
$_preloadValues
= array('active' => 1)
$_primaryKey
Primary key
protected
string
$_primaryKey
= 'id'
$_propertyValues
Values of all properties of user
protected
array<string|int, mixed>
$_propertyValues
= \NULL
$_queryBuilder
Select query builder
protected
Core_QueryBuilder_Select
$_queryBuilder
= \NULL
$_shortcodeTags
List of Shortcodes tags
protected
array<string|int, mixed>
$_shortcodeTags
= array()
$_showXmlCompanies
Show siteuser companies data in XML
protected
bool
$_showXmlCompanies
= \TRUE
$_showXmlMaillists
Show maillists data in XML
protected
bool
$_showXmlMaillists
= \FALSE
$_showXmlPeople
Show siteuser people data in XML
protected
bool
$_showXmlPeople
= \TRUE
$_showXmlProperties
Show properties in XML
protected
mixed
$_showXmlProperties
= \FALSE
$_skipColumns
List of skipped columns from table
protected
array<string|int, mixed>
$_skipColumns
= array('icq', 'name', 'surname', 'patronymic', 'company', 'phone', 'fax', 'website', 'postcode', 'country', 'city', 'address')
$_sorting
Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
protected
array<string|int, mixed>
$_sorting
= array()
$_tableColumns
List of columns in table
protected
array<string|int, mixed>
$_tableColumns
= array()
$_tableName
Table name, e.g. 'books' for 'Book_Model'
protected
mixed
$_tableName
= \NULL
$_typicalForbiddenTags
Typical forbidden tags.
protected
array<string|int, mixed>
$_typicalForbiddenTags
= array()
$_xmlSortPropertiesValues
Sort properties values in XML
protected
mixed
$_xmlSortPropertiesValues
= \TRUE
Methods
__call()
Triggered when invoking inaccessible methods in an object context
public
__call(mixed $name, mixed $arguments) : mixed
Parameters
- $name : mixed
-
method name
- $arguments : mixed
-
arguments
Return values
mixed —__construct()
Constructor.
public
__construct([int $id = NULL ]) : mixed
Parameters
- $id : int = NULL
-
entity ID
Return values
mixed —__isset()
public
__isset(mixed $property) : mixed
Parameters
- $property : mixed
Return values
mixed —__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 —activate()
Change activity status to ON
public
activate() : self
Tags
Return values
self —add()
Add related object. If main object does not save, it will save.
public
add(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
- $model : Core_ORM
- $relation : string = NULL
Tags
Return values
self —addAllowedTag()
Add tag to allowed tags list
public
addAllowedTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
self —addAttribute()
Add entity attribute
public
addAttribute(string $name, string $value) : self
Parameters
- $name : string
- $value : string
Return values
self —addEntities()
Add children entities
public
addEntities(array<string|int, mixed> $aChildrenEntities) : self
Parameters
- $aChildrenEntities : array<string|int, mixed>
Return values
self —addEntity()
Add a children entity
public
addEntity(Core_Entity $oChildrenEntity) : self
Parameters
- $oChildrenEntity : Core_Entity
Return values
self —addForbiddenTag()
Add tag to forbidden tags list
public
addForbiddenTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
self —addForbiddenTags()
Add tags to forbidden tags list
public
addForbiddenTags(array<string|int, mixed> $aTags) : self
Parameters
- $aTags : array<string|int, mixed>
-
array of tags
Return values
self —addFriend()
Add user to friend list
public
addFriend(Siteuser_Model $oSiteuser_Friend) : self
Parameters
- $oSiteuser_Friend : Siteuser_Model
-
site user
Return values
self —addXmlTag()
Add external tag for entity
public
addXmlTag(string $tagName, string $tagValue[, array<string|int, mixed> $attributes = array() ]) : self
Parameters
- $tagName : string
-
tag name
- $tagValue : string
-
tag value
- $attributes : array<string|int, mixed> = array()
-
attributes
Return values
self —applyMarksDeleted()
Apply markDeleted flag if is set
public
applyMarksDeleted() : self
Return values
self —attachSessionToIp()
public
attachSessionToIp(mixed $bAttachSessionToIp) : mixed
Parameters
- $bAttachSessionToIp : mixed
Return values
mixed —changeActive()
Change site user status
public
changeActive() : Siteuser_Model
Tags
Return values
Siteuser_Model —changeCopiedName()
Set if change copied name is necessary
public
changeCopiedName(bool $changeCopiedName) : self
Parameters
- $changeCopiedName : bool
-
mode
Return values
self —changed()
Check model has been changed.
public
changed() : bool
Return values
bool —check()
Check model values. If model has incorrect value, one will correct or call exception.
public
check([bool $exception = FALSE ]) : self
$object = Core_ORM::factory('Book', 1);
$object->value = 123;
$object->check(TRUE)->save();
Parameters
- $exception : bool = FALSE
-
Call exception (TRUE) or correct value (FALSE). Default FALSE.
Return values
self —chunk()
Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
public
chunk(int $count, callable $callback[, bool $bCache = TRUE ]) : bool
Parameters
- $count : int
-
chunk size
- $callback : callable
- $bCache : bool = TRUE
-
use cache
Return values
bool —clear()
Clear object
public
clear() : self
Return values
self —clearEntities()
Clear enities
public
clearEntities() : self
Return values
self —clearEntitiesAfterGetXml()
Clear all entities after XML generation
public
clearEntitiesAfterGetXml([bool $clear = TRUE ]) : self
Parameters
- $clear : bool = TRUE
-
mode
Return values
self —clearXmlTags()
Clear external XML tags for entity.
public
clearXmlTags() : mixed
Return values
mixed —copy()
Copy object
public
copy() : Core_Entity
Tags
Return values
Core_Entity —counterpartyBackend()
Backend callback method
public
counterpartyBackend(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : Admin_Form_Field
- $oAdmin_Form_Controller : Admin_Form_Controller
Return values
string —create()
Insert new object data into database
public
create() : self
Tags
Return values
self —createDir()
Create directory for item
public
createDir() : self
Return values
self —delete()
Delete object from database
public
delete([mixed $primaryKey = NULL ]) : Core_Entity
Parameters
- $primaryKey : mixed = NULL
-
primary key for deleting object
Tags
Return values
Core_Entity —deleteAll()
Delete all object
public
deleteAll([bool $bCache = TRUE ][, int $limit = 100 ]) : self
Parameters
- $bCache : bool = TRUE
-
use cache
- $limit : int = 100
-
default 100
Core_ORM::factory('Book')->Comments->deleteAll();
Return values
self —factory()
Create and return an object of model
public
static factory( $modelName[, $primaryKey = NULL ]) : mixed
Parameters
Return values
mixed —find()
Find object in database and load one. Use clear() before find() with conditions!
public
find([mixed $primaryKey = NULL ][, bool $bCache = TRUE ]) : self
Parameters
- $primaryKey : mixed = NULL
-
default NULL
- $bCache : bool = TRUE
-
use cache
// Find an object and load (without lazy load) // If an object is not found, primary key sets NULL $oBook = Core_ORM::factory('Book')->find(1);
Return values
self —findAll()
Find all objects
public
findAll([bool $bCache = TRUE ]) : array<string|int, mixed>
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
// Find objects $aBooks = Core_ORM::factory('Book')->findAll(); foreach ($aBooks as $oBook) { var_dump($oBook->id); }
Tags
Return values
array<string|int, mixed> —getAllowedMaillists()
Список доступных пользователю рассылок 'Maillists'
public
getAllowedMaillists() : array<string|int, mixed>
Return values
array<string|int, mixed> —getBonuses()
Get siteuser bonuses
public
getBonuses(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
Return values
array<string|int, mixed> —getByLoginAndEmail()
Get user by login and email
public
getByLoginAndEmail(string $login, string $email) : Siteuser_Model|null
Parameters
- $login : string
-
login
- $email : string
-
email
Return values
Siteuser_Model|null —getByLoginAndPassword()
Get user by login and password
public
getByLoginAndPassword(string $login, string $password) : Siteuser_Model|null
Parameters
- $login : string
-
login
- $password : string
-
password
Return values
Siteuser_Model|null —getChangedData()
Get changed columns with values
public
getChangedData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getClassName()
Get Model CallsName
public
static getClassName( $modelName) : string
Parameters
Return values
string —getCount()
Get count object
public
getCount([bool $bCache = TRUE ][, string $fieldName = '*' ][, bool $distinct = FALSE ]) : int|false
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
- $fieldName : string = '*'
-
default '*'
- $distinct : bool = FALSE
-
default FALSE
Return values
int|false —
$iCount = Core_ORM::factory('Book')->getCount();
var_dump($iCount);
getCurrent()
Get current user
public
getCurrent([ $bCheckSite = FALSE ]) : Siteuser_Model|null
Parameters
Tags
Return values
Siteuser_Model|null —getDatabaseDriver()
Get name of Database Driver
public
static getDatabaseDriver() : string
Return values
string —getDataValues()
Get dataValues
public
getDataValues() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDirHref()
Get object directory href
public
getDirHref() : string
Return values
string —getDirPath()
Get object directory path
public
getDirPath() : string
Return values
string —getEntities()
Get children entities
public
getEntities() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFieldIDs()
Get visible field's IDs
public
getFieldIDs() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFields()
Get field's values
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFirst()
Get fist entity, ordered by primary key
public
getFirst([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
Return values
null|Core_ORM —
$mObject = Core_ORM::factory('Book')->getFirst();
if (!is_null($mObject))
{
echo $mObject;
}
getForbiddenTags()
Get forbidden tags list
public
getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —getLast()
Get last entity, ordered by primary key
public
getLast([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
- $bCache : bool = TRUE
-
use cache, default TRUE
Return values
null|Core_ORM —
$mObject = Core_ORM::factory('Book')->getLast();
if (!is_null($mObject))
{
echo $mObject;
}
getLastActivity()
Return number of seconds since last activity
public
getLastActivity() : int
Return values
int —getMarksDeleted()
Get column name for marks deleted
public
getMarksDeleted() : string
Return values
string —getModelName()
Get model name, e.g. 'book' for 'Book_Model'
public
getModelName() : string
Return values
string —getName()
Get entity name
public
getName() : string
Tags
Return values
string —getNameColumn()
Get Name Column
public
getNameColumn() : string
Return values
string —getPath()
Get path for files
public
getPath() : string
Return values
string —getPrimaryKey()
Get primary key value
public
getPrimaryKey() : mixed
Return values
mixed —getPrimaryKeyName()
Get primary key name
public
getPrimaryKeyName() : string
Return values
string —getPropertyValues()
Values of all properties of element
public
getPropertyValues([bool $bCache = TRUE ][, array<string|int, mixed> $aPropertiesId = array() ][, bool $bSorting = FALSE ]) : array<string|int, mixed>
Parameters
- $bCache : bool = TRUE
-
cache mode
- $aPropertiesId : array<string|int, mixed> = array()
-
array of properties' IDs
- $bSorting : bool = FALSE
-
sort results, default FALSE
Return values
array<string|int, mixed> —Property_Value
getRelatedSite()
Get Related Site
public
getRelatedSite() : Site_Model|null
Tags
Return values
Site_Model|null —getRelations()
Get $this->_relations
public
getRelations() : array<string|int, mixed>
Return values
array<string|int, mixed> —getStdObject()
Get stdObject for entity and children entities
public
getStdObject([mixed $attributePrefix = '_' ]) : stdObject
Parameters
- $attributePrefix : mixed = '_'
Tags
Return values
stdObject —getTableColumns()
Get tableColumns
public
getTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTableColums()
Get table columns. Fix wrong method name
public
getTableColums() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTableName()
Get table name
public
getTableName() : string
Return values
string —getTransactions()
Get all shop's transactions
public
getTransactions(Shop_Model $oShop) : array<string|int, mixed>
Parameters
- $oShop : Shop_Model
-
shop
Return values
array<string|int, mixed> —getTransactionsAmount()
Get amount of all shop transactions
public
getTransactionsAmount(Shop_Model $oShop) : float
Parameters
- $oShop : Shop_Model
-
shop
Return values
float —getTrashDescription()
Get entity description
public
getTrashDescription() : string
Return values
string —getXml()
Get XML for entity and children entities
public
getXml() : string
Tags
Return values
string —getXmlTagName()
Get tag name
public
getXmlTagName() : string
Return values
string —getXmlTags()
Get external XML tags for entity.
public
getXmlTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —indexing()
Search indexation
public
indexing() : Search_Page
Tags
Return values
Search_Page —isCallable()
Verify that the contents of a variable can be called as a function
public
isCallable(string $methodName) : bool
Parameters
- $methodName : string
-
method name
Return values
bool —isEmptyPrimaryKey()
Check is primary key NULL
public
isEmptyPrimaryKey() : bool
Return values
bool —isOnline()
Is user online
public
isOnline() : bool
Return values
bool —loginBackend()
Backend callback method
public
loginBackend() : string
Return values
string —markDeleted()
Mark entity as deleted
public
markDeleted() : self
Tags
Return values
self —merge()
Merge siteuser with another one
public
merge(Siteuser_Model $oObject) : self
Parameters
- $oObject : Siteuser_Model
-
siteuser
Return values
self —queryBuilder()
Get query builder for select
public
queryBuilder() : Core_QueryBuilder_Select
Return values
Core_QueryBuilder_Select —remove()
Remove related object. If main object does not save, it will save.
public
remove(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
- $model : Core_ORM
- $relation : string = NULL
Tags
Return values
self —removeForbiddenTag()
Remove tag from forbidden tags list
public
removeForbiddenTag(string $tag) : self
Parameters
- $tag : string
-
tag
Return values
self —removeFriend()
Remove user from friend list
public
removeFriend(Siteuser_Model $oSiteuser_Friend) : self
Parameters
- $oSiteuser_Friend : Siteuser_Model
-
site user
Return values
self —save()
Save object. Use self::update() or self::create()
public
save() : self
Return values
self —setCheck()
Set _check flag
public
setCheck(bool $check) : self
Parameters
- $check : bool
-
mode
Return values
self —setCurrent()
Set user as current
public
setCurrent([int $expires = 2678400 ]) : self
Parameters
- $expires : int = 2678400
-
cookie lifetime
Return values
self —setDatabaseDriver()
Set name of Database Driver
public
static setDatabaseDriver(string $name) : mixed
Parameters
- $name : string
-
driver's name
Return values
mixed —setMarksDeleted()
Set column name for marks deleted
public
setMarksDeleted([mixed $marksDeleted = 'deleted' ]) : self
Parameters
- $marksDeleted : mixed = 'deleted'
Return values
self —setRelations()
Set $this->_relations
public
setRelations(array<string|int, mixed> $relations) : self
Parameters
- $relations : array<string|int, mixed>
-
Array with new relations
Return values
self —setXmlTagName()
Set name of XML node
public
setXmlTagName(string $tagName) : self
Parameters
- $tagName : string
-
new tag name for node
Return values
self —showXmlCompanies()
Show siteuser companies in XML
public
showXmlCompanies([bool $showXmlCompanies = TRUE ]) : self
Parameters
- $showXmlCompanies : bool = TRUE
Return values
self —showXmlMaillists()
Show maillist in XML
public
showXmlMaillists([bool $showXmlMaillists = TRUE ]) : self
Parameters
- $showXmlMaillists : bool = TRUE
Return values
self —showXmlPeople()
Show siteuser people in XML
public
showXmlPeople([bool $showXmlPeople = TRUE ]) : self
Parameters
- $showXmlPeople : bool = TRUE
Return values
self —showXmlProperties()
Show properties in XML
public
showXmlProperties([mixed $showXmlProperties = TRUE ][, mixed $xmlSortPropertiesValues = TRUE ]) : self
Parameters
- $showXmlProperties : mixed = TRUE
-
array of allowed properties ID or boolean
- $xmlSortPropertiesValues : mixed = TRUE
Return values
self —toArray()
Convert Object to Array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —undelete()
Turn off deleted status
public
undelete() : self
Tags
Return values
self —unsetCurrent()
Unset current user from session
public
unsetCurrent() : self
Return values
self —update()
Update object data into database
public
update() : self
Tags
Return values
self —updateLastActivity()
Update last activity
public
updateLastActivity() : self
Return values
self —_getCopiedName()
Get the name of a new copied object
protected
_getCopiedName() : mixed
Return values
mixed —_prepareData()
Prepare entity and children entities
protected
_prepareData() : self
Return values
self —_preparePropertyValue()
Prepare Property Value
protected
_preparePropertyValue(Property_Value_Model $oProperty_Value) : mixed
Parameters
- $oProperty_Value : Property_Value_Model
Return values
mixed —getDatabase()
Get Database
protected
getDatabase() : Core_DataBase