PHP Class Jarves\Storage\Propel

Inheritance: extends AbstractStorage
Exibir arquivo Open project: jarves/jarves Class Usage Examples

Protected Properties

Property Type Description
$acl Jarves\ACL
$conditionOperator Jarves\ConditionOperator
$jarves Jarves\Jarves
$objects Jarves\Objects
$propelPrimaryKeys array
$query object
$tableMap Propel\Runtime\Map\TableMap

Public Methods

Method Description
__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 )

Method Details

__construct() public method

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

add() public method

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

clear() public method

public clear ( )

clearCache() public method

public clearCache ( )

configure() public method

public configure ( $objectKey, $definition )

export() public method

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

extractSelection() public method

public extractSelection ( $fields )

getBranch() public method

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

getBranchChildrenCount() public method

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

getCount() public method

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

getFields() public method

If '*' we return all allowed fields.
public getFields ( array | string $fields ) : array
$fields array | string
return array

getItem() public method

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

getItems() public method

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

getNestedSubCondition() public method

So we include with this condition all entries 'inside' the entry defined through $condition.
public getNestedSubCondition ( Condition $condition ) : Condition
$condition Jarves\Configuration\Condition
return Jarves\Configuration\Condition

getParent() public method

public getParent ( $pk, $options = null )

getParents() public method

public getParents ( $pk, $options = null )

getPhpName() public method

Returns php class name.
public getPhpName ( string $objectName = null ) : string
$objectName string
return string

getPropelPk() public method

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
return mixed Propel PK

getQueryClass() public method

Returns a new query class.
public getQueryClass ( null $name = null ) : mixed
$name null
return mixed

getRoots() public method

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

getStm() public method

public getStm ( Propel\Runtime\ActiveQuery\ModelCriteria $query, Condition $condition = null ) : PDOStatement
$query Propel\Runtime\ActiveQuery\ModelCriteria
$condition Jarves\Configuration\Condition
return PDOStatement

getVersionDiff() public method

public getVersionDiff ( $pk, $options = null )

getVersions() public method

public getVersions ( $pk, $options = null )

mapCondition() public method

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 method

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

mapOptions() public method

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

mapPk() public method

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

mapResult() public method

public mapResult ( $result, callable $callback ) : array
$callback callable
return array

mapToOneRelationFields() public method

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 method

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

move() public method

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

onlyPrimaryKeySelected() public method

Checks whether only primary key fields should be selected.
public onlyPrimaryKeySelected ( array $options ) : boolean
$options array with 'fields' item (e.g ['fields' => 'id, name'])
return boolean

patch() public method

public patch ( $pk, $values )

pkFromRow() public method

public pkFromRow ( $row )

populateRow() public method

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
return array

remove() public method

public remove ( $pk )

update() public method

public update ( $pk, $values )

Property Details

$acl protected_oe property

protected ACL,Jarves $acl
return Jarves\ACL

$conditionOperator protected_oe property

protected ConditionOperator,Jarves $conditionOperator
return Jarves\ConditionOperator

$jarves protected_oe property

protected Jarves,Jarves $jarves
return Jarves\Jarves

$objects protected_oe property

protected Objects,Jarves $objects
return Jarves\Objects

$propelPrimaryKeys protected_oe property

protected array $propelPrimaryKeys
return array

$query protected_oe property

protected object $query
return object

$tableMap protected_oe property

protected TableMap,Propel\Runtime\Map $tableMap
return Propel\Runtime\Map\TableMap