PHP Класс Jarves\Storage\Propel

Наследование: extends AbstractStorage
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$acl Jarves\ACL
$conditionOperator Jarves\ConditionOperator
$jarves Jarves\Jarves
$objects Jarves\Objects
$propelPrimaryKeys array
$query object
$tableMap Propel\Runtime\Map\TableMap

Открытые методы

Метод Описание
__construct ( Jarves $jarves, Objects $objects, ACL $acl, ConditionOperator $conditionOperator )
add ( $values, $targetPk = null, $mode = 'first', $scope = null )
clear ( )
clearCache ( )
configure ( $objectKey, $definition )
export ( Condition $condition = null )
extractSelection ( $fields )
getBranch ( $pk = null, Condition $condition = null, $depth = 1, $scope = null, $options = null )
getBranchChildrenCount ( $pk = null, Condition $condition = null, $scope = null )
getCount ( Condition $condition = null )
getFields ( array | string $fields ) : array Returns all column names by allowed and extracted fields.
getItem ( $pk, $options = [] ) {@inheritDoc}
getItems ( array $filter = null, Condition $condition = null, $options = null ) {@inheritDoc}
getNestedSubCondition ( Condition $condition ) : Condition Propel uses for his nested-set objects lft and rgt fields.
getParent ( $pk, $options = null )
getParents ( $pk, $options = null )
getPhpName ( string $objectName = null ) : string Returns php class name.
getPropelPk ( array $pk, string $objectKey = null ) : mixed Since the core provide the pk as array('id' => 123) and not as array(123) we have to convert it for propel orm.
getQueryClass ( null $name = null ) : mixed Returns a new query class.
getRoots ( Condition $condition = null, $options = null )
getStm ( Propel\Runtime\ActiveQuery\ModelCriteria $query, Condition $condition = null ) : PDOStatement
getVersionDiff ( $pk, $options = null )
getVersions ( $pk, $options = null )
mapCondition ( Propel\Runtime\ActiveQuery\ModelCriteria $query, Condition $condition = null ) Adds $query->where() based on $condition.
mapFilter ( mixed $query, array $filter )
mapOptions ( Propel\Runtime\ActiveQuery\ModelCriteria $query, array $options = [] ) Maps options like limit, offset, order
mapPk ( mixed $query, array $pk ) Sets the filterBy by &$query from $pk.
mapResult ( $result, callable $callback ) : array
mapToOneRelationFields ( Propel\Runtime\ActiveQuery\ModelCriteria &$query, Propel\Runtime\Map\RelationMap[] $relations, string[][] $relationFields )
mapValues ( &$item, array &$values, boolean $ignoreNotExistingValues = false )
move ( $pk, $targetPk, $position = 'first', $targetObjectKey = null ) {@inheritDoc}
onlyPrimaryKeySelected ( array $options ) : boolean Checks whether only primary key fields should be selected.
patch ( $pk, $values )
pkFromRow ( $row )
populateRow ( $clazz, $row, $selects, $relations, $relationFields, boolean $permissionCheck = false ) : array Generates a row from the propel object using the get*() methods. Resolves *-to-many relations.
remove ( $pk )
search ( $query, Condition $condition = null, $max = 20 )
update ( $pk, $values )

Описание методов

__construct() публичный Метод

public __construct ( Jarves $jarves, Objects $objects, ACL $acl, ConditionOperator $conditionOperator )
$jarves Jarves\Jarves
$objects Jarves\Objects
$acl Jarves\ACL
$conditionOperator Jarves\ConditionOperator

add() публичный Метод

public add ( $values, $targetPk = null, $mode = 'first', $scope = null )

clear() публичный Метод

public clear ( )

clearCache() публичный Метод

public clearCache ( )

configure() публичный Метод

public configure ( $objectKey, $definition )

export() публичный Метод

public export ( Condition $condition = null )
$condition Jarves\Configuration\Condition

extractSelection() публичный Метод

public extractSelection ( $fields )

getBranch() публичный Метод

public getBranch ( $pk = null, Condition $condition = null, $depth = 1, $scope = null, $options = null )
$condition Jarves\Configuration\Condition

getBranchChildrenCount() публичный Метод

public getBranchChildrenCount ( $pk = null, Condition $condition = null, $scope = null )
$condition Jarves\Configuration\Condition

getCount() публичный Метод

public getCount ( Condition $condition = null )
$condition Jarves\Configuration\Condition

getFields() публичный Метод

If '*' we return all allowed fields.
public getFields ( array | string $fields ) : array
$fields array | string
Результат array

getItem() публичный Метод

{@inheritDoc}
public getItem ( $pk, $options = [] )

getItems() публичный Метод

{@inheritDoc}
public getItems ( array $filter = null, Condition $condition = null, $options = null )
$filter array
$condition Jarves\Configuration\Condition

getNestedSubCondition() публичный Метод

So we include with this condition all entries 'inside' the entry defined through $condition.
public getNestedSubCondition ( Condition $condition ) : Condition
$condition Jarves\Configuration\Condition
Результат Jarves\Configuration\Condition

getParent() публичный Метод

public getParent ( $pk, $options = null )

getParents() публичный Метод

public getParents ( $pk, $options = null )

getPhpName() публичный Метод

Returns php class name.
public getPhpName ( string $objectName = null ) : string
$objectName string
Результат string

getPropelPk() публичный Метод

Since the core provide the pk as array('id' => 123) and not as array(123) we have to convert it for propel orm.
public getPropelPk ( array $pk, string $objectKey = null ) : mixed
$pk array
$objectKey string
Результат mixed Propel PK

getQueryClass() публичный Метод

Returns a new query class.
public getQueryClass ( null $name = null ) : mixed
$name null
Результат mixed

getRoots() публичный Метод

public getRoots ( Condition $condition = null, $options = null )
$condition Jarves\Configuration\Condition

getStm() публичный Метод

public getStm ( Propel\Runtime\ActiveQuery\ModelCriteria $query, Condition $condition = null ) : PDOStatement
$query Propel\Runtime\ActiveQuery\ModelCriteria
$condition Jarves\Configuration\Condition
Результат PDOStatement

getVersionDiff() публичный Метод

public getVersionDiff ( $pk, $options = null )

getVersions() публичный Метод

public getVersions ( $pk, $options = null )

mapCondition() публичный Метод

Adds $query->where() based on $condition.
public mapCondition ( Propel\Runtime\ActiveQuery\ModelCriteria $query, Condition $condition = null )
$query Propel\Runtime\ActiveQuery\ModelCriteria
$condition Jarves\Configuration\Condition

mapFilter() публичный Метод

public mapFilter ( mixed $query, array $filter )
$query mixed
$filter array

mapOptions() публичный Метод

Maps options like limit, offset, order
public mapOptions ( Propel\Runtime\ActiveQuery\ModelCriteria $query, array $options = [] )
$query Propel\Runtime\ActiveQuery\ModelCriteria
$options array

mapPk() публичный Метод

Sets the filterBy by &$query from $pk.
public mapPk ( mixed $query, array $pk )
$query mixed
$pk array

mapResult() публичный Метод

public mapResult ( $result, callable $callback ) : array
$callback callable
Результат array

mapToOneRelationFields() публичный Метод

public mapToOneRelationFields ( Propel\Runtime\ActiveQuery\ModelCriteria &$query, Propel\Runtime\Map\RelationMap[] $relations, string[][] $relationFields )
$query Propel\Runtime\ActiveQuery\ModelCriteria
$relations Propel\Runtime\Map\RelationMap[]
$relationFields string[][]

mapValues() публичный Метод

public mapValues ( &$item, array &$values, boolean $ignoreNotExistingValues = false )
$item propel object
$values array
$ignoreNotExistingValues boolean

move() публичный Метод

{@inheritDoc}
public move ( $pk, $targetPk, $position = 'first', $targetObjectKey = null )

onlyPrimaryKeySelected() публичный Метод

Checks whether only primary key fields should be selected.
public onlyPrimaryKeySelected ( array $options ) : boolean
$options array with 'fields' item (e.g ['fields' => 'id, name'])
Результат boolean

patch() публичный Метод

public patch ( $pk, $values )

pkFromRow() публичный Метод

public pkFromRow ( $row )

populateRow() публичный Метод

Generates a row from the propel object using the get*() methods. Resolves *-to-many relations.
public populateRow ( $clazz, $row, $selects, $relations, $relationFields, boolean $permissionCheck = false ) : array
$clazz
$row
$selects
$relations
$relationFields
$permissionCheck boolean
Результат array

remove() публичный Метод

public remove ( $pk )

update() публичный Метод

public update ( $pk, $values )

Описание свойств

$acl защищенное свойство

protected ACL,Jarves $acl
Результат Jarves\ACL

$conditionOperator защищенное свойство

protected ConditionOperator,Jarves $conditionOperator
Результат Jarves\ConditionOperator

$jarves защищенное свойство

protected Jarves,Jarves $jarves
Результат Jarves\Jarves

$objects защищенное свойство

protected Objects,Jarves $objects
Результат Jarves\Objects

$propelPrimaryKeys защищенное свойство

protected array $propelPrimaryKeys
Результат array

$query защищенное свойство

protected object $query
Результат object

$tableMap защищенное свойство

protected TableMap,Propel\Runtime\Map $tableMap
Результат Propel\Runtime\Map\TableMap