PHP Class Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\PropertyConditionGenerator

Inheritance: implements Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\SqlGeneratorInterface
Mostrar archivo Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$entityManager Doctrine\Common\Persistence\ObjectManager
$globalObjects array Array of registered global objects that can be accessed as operands
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$operand mixed
$operandDefinition string | array
$operator string
$parameters array Raw parameter values
$path string Property path the currently parsed expression relates to
$persistenceManager Neos\Flow\Persistence\Doctrine\PersistenceManager
$policyService Neos\Flow\Security\Policy\PolicyService
$securityContext Neos\Flow\Security\Context

Public Methods

Method Description
__construct ( string $path )
equals ( string | array $operandDefinition ) : PropertyConditionGenerator
getObjectValueByPath ( mixed $object, string $path ) : mixed Redirects directly to \Neos\Utility\ObjectAccess::getPropertyPath($result, $propertyPath) This is only needed for unit tests!
getSql ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias ) : string
getValueForOperand ( mixed $expression ) : mixed Returns the static value of the given operand, this might be also a global object
greaterOrEqual ( mixed $operandDefinition ) : PropertyConditionGenerator
greaterThan ( mixed $operandDefinition ) : PropertyConditionGenerator
in ( mixed $operandDefinition ) : PropertyConditionGenerator
lessOrEqual ( mixed $operandDefinition ) : PropertyConditionGenerator
lessThan ( mixed $operandDefinition ) : PropertyConditionGenerator
like ( mixed $operandDefinition ) : PropertyConditionGenerator
notEquals ( string | array $operandDefinition ) : PropertyConditionGenerator

Protected Methods

Method Description
getConstraintStringForSimpleProperty ( SQLFilter $sqlFilter, string $propertyPointer, string $operandDefinition = null ) : string
getRawParameterValue ( mixed $name ) : mixed
getSqlForManyToOneAndOneToOneRelationsWithPropertyPath ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
getSqlForManyToOneAndOneToOneRelationsWithoutPropertyPath ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
getSqlForSimpleProperty ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
getSubselectQuery ( Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetEntityPropertyName ) : Query
setParameter ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, mixed $name, mixed $value, string $type = null ) : void

Method Details

__construct() public method

public __construct ( string $path )
$path string Property path the currently parsed expression relates to

equals() public method

public equals ( string | array $operandDefinition ) : PropertyConditionGenerator
$operandDefinition string | array
return PropertyConditionGenerator the current instance to allow for method chaining

getConstraintStringForSimpleProperty() protected method

protected getConstraintStringForSimpleProperty ( SQLFilter $sqlFilter, string $propertyPointer, string $operandDefinition = null ) : string
$sqlFilter SQLFilter
$propertyPointer string
$operandDefinition string
return string

getObjectValueByPath() public method

Redirects directly to \Neos\Utility\ObjectAccess::getPropertyPath($result, $propertyPath) This is only needed for unit tests!
public getObjectValueByPath ( mixed $object, string $path ) : mixed
$object mixed The object to fetch the property from
$path string The path to the property to be fetched
return mixed The property value

getRawParameterValue() protected method

protected getRawParameterValue ( mixed $name ) : mixed
$name mixed
return mixed the raw parameter value

getSql() public method

public getSql ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias ) : string
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetTableAlias string
return string

getSqlForManyToOneAndOneToOneRelationsWithPropertyPath() protected method

protected getSqlForManyToOneAndOneToOneRelationsWithPropertyPath ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$quoteStrategy Doctrine\ORM\Mapping\QuoteStrategy
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetTableAlias string
$targetEntityPropertyName string
return string

getSqlForManyToOneAndOneToOneRelationsWithoutPropertyPath() protected method

protected getSqlForManyToOneAndOneToOneRelationsWithoutPropertyPath ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$quoteStrategy Doctrine\ORM\Mapping\QuoteStrategy
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetTableAlias string
$targetEntityPropertyName string
return string

getSqlForSimpleProperty() protected method

protected getSqlForSimpleProperty ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, Doctrine\ORM\Mapping\QuoteStrategy $quoteStrategy, Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias, string $targetEntityPropertyName ) : string
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$quoteStrategy Doctrine\ORM\Mapping\QuoteStrategy
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetTableAlias string
$targetEntityPropertyName string
return string

getSubselectQuery() protected method

protected getSubselectQuery ( Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetEntityPropertyName ) : Query
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetEntityPropertyName string
return Neos\Flow\Persistence\Doctrine\Query

getValueForOperand() public method

Returns the static value of the given operand, this might be also a global object
public getValueForOperand ( mixed $expression ) : mixed
$expression mixed The expression string representing the operand
return mixed The calculated value

greaterOrEqual() public method

public greaterOrEqual ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

greaterThan() public method

public greaterThan ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

in() public method

public in ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

lessOrEqual() public method

public lessOrEqual ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

lessThan() public method

public lessThan ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

like() public method

public like ( mixed $operandDefinition ) : PropertyConditionGenerator
$operandDefinition mixed
return PropertyConditionGenerator the current instance to allow for method chaining

notEquals() public method

public notEquals ( string | array $operandDefinition ) : PropertyConditionGenerator
$operandDefinition string | array
return PropertyConditionGenerator the current instance to allow for method chaining

setParameter() protected method

protected setParameter ( Doctrine\ORM\Query\Filter\SQLFilter $sqlFilter, mixed $name, mixed $value, string $type = null ) : void
$sqlFilter Doctrine\ORM\Query\Filter\SQLFilter
$name mixed
$value mixed
$type string
return void

Property Details

$entityManager protected_oe property

protected ObjectManager,Doctrine\Common\Persistence $entityManager
return Doctrine\Common\Persistence\ObjectManager

$globalObjects protected_oe property

Array of registered global objects that can be accessed as operands
protected array $globalObjects
return array

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$operand protected_oe property

protected mixed $operand
return mixed

$operandDefinition protected_oe property

protected string|array $operandDefinition
return string | array

$operator protected_oe property

protected string $operator
return string

$parameters protected_oe property

Raw parameter values
protected array $parameters
return array

$path protected_oe property

Property path the currently parsed expression relates to
protected string $path
return string

$persistenceManager protected_oe property

protected PersistenceManager,Neos\Flow\Persistence\Doctrine $persistenceManager
return Neos\Flow\Persistence\Doctrine\PersistenceManager

$policyService protected_oe property

protected PolicyService,Neos\Flow\Security\Policy $policyService
return Neos\Flow\Security\Policy\PolicyService

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
return Neos\Flow\Security\Context