Method | Description | |
---|---|---|
__call ( $method, $args ) | ||
__callStatic ( $name, $arguments ) | ||
__get ( $prop ) | ||
__set ( $prop, $value ) | ||
__unset ( $prop ) | ||
_buildQuery ( array $criteria, string $conjunction = 'AND', string $tableAlias = null ) : array | Builds query statement | |
db ( ) : ADODB_mysqli | Gets database instance associated with the entity | |
delete ( ) | Removes current record from database by primary key | |
fields ( string $tableAlias = null, boolean $prefixed = false ) : string | Gets comma separated list of the columns prefixed either with the table name or the specified table alias | |
getEntityAnnotation ( ) : Scalr\Model\Loader\Entity | Gets entity annotation for the class | |
getIterator ( ) : Scalr\Model\EntityPropertiesIterator | ||
load ( array | object $obj, string $tableAlias = null ) | Loads an entity from array or object | |
qstr ( string | Scalr\Model\Loader\Field $field, mixed $value = null ) : string | Escapes value for the field | |
result ( integer $resultType ) : |
Instantiate an object and sets the type of the result | |
save ( ) | Saves current entity to database | |
table ( string $alias = null ) : string | Gets table name which is associated with the entity | |
type ( string $field ) : Scalr\Model\Type\TypeInterface | Gets the type for the specified field | |
update ( array | Iterato\Iterator $fieldValues ) | Updates only specified properties to database ingoring all others |
Method | Description | |
---|---|---|
_column ( string $fieldName, string $tableAlias = null, string $alias = null ) : string | Gets column name for the specified field | |
_delete ( array $criteria = null, integer $limit = null ) : integer | Removes records from database by criteria | |
_deletePk ( array $args = [] ) : integer | Removes record from database by primary key | |
_fetchIndexes ( ) | Retrieves show indexes info and stores it in the cache | |
_find ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : |
Finds collection of the values by any key | |
_findOne ( array $criteria = null, array $group = null, array $order = null ) : |
Finds one record by given criteria | |
_findPk ( array $args = [] ) : |
Finds record by primary key | |
_hasUniqueIndex ( ) : boolean | Checks whether the table has at least one unique index | |
_parseClassDocComment ( ) | Parses phpdoc comment for entity class | |
_prepareSaveStatement ( ) : Scalr\Model\EntityStatement | Prepares statement to store data in database |
public db ( ) : ADODB_mysqli | ||
return | ADODB_mysqli | Database connection instance |
public getEntityAnnotation ( ) : Scalr\Model\Loader\Entity | ||
return | Scalr\Model\Loader\Entity | Returns entity annotation for the class |
public getIterator ( ) : Scalr\Model\EntityPropertiesIterator | ||
return | Scalr\Model\EntityPropertiesIterator | Gets EntityPropertiesIterator |
public qstr ( string | Scalr\Model\Loader\Field $field, mixed $value = null ) : string | ||
$field | string | Scalr\Model\Loader\Field | The name of the field or the Field object |
$value | mixed | optional The value to escape or it will take field's value from the object |
return | string | Returns escaped value for the fiel |
public update ( array | Iterato\Iterator $fieldValues ) | ||
$fieldValues | array | Iterato\Iterator | The list of the fields with its values looks like [fieldName1 => $value1, filedName2 ...] If it is provided with the field name in the value place with numerical index it will update the record with the value taken from the entity itself. |