GraphAware\Neo4j\OGM\Metadata\RelationshipMetadata::__construct PHP Method

__construct() public method

public __construct ( string $className, ReflectionProperty $reflectionProperty, Relationship $relationshipAnnotation, boolean $isLazy = false, OrderBy $orderBy = null )
$className string
$reflectionProperty ReflectionProperty
$relationshipAnnotation GraphAware\Neo4j\OGM\Annotations\Relationship
$isLazy boolean
$orderBy GraphAware\Neo4j\OGM\Annotations\OrderBy
    public function __construct($className, \ReflectionProperty $reflectionProperty, Relationship $relationshipAnnotation, $isLazy = false, OrderBy $orderBy = null)
    {
        $this->className = $className;
        $this->propertyName = $reflectionProperty->getName();
        $this->reflectionProperty = $reflectionProperty;
        $this->relationshipAnnotation = $relationshipAnnotation;
        $this->isLazy = $isLazy;
        $this->orderBy = $orderBy;
        if (null !== $orderBy) {
            if (!in_array($orderBy->order, ['ASC', 'DESC'], true)) {
                throw new MappingException(sprintf('The order "%s" is not valid', $orderBy->order));
            }
        }
    }