Jackalope\Query\Query::__construct PHP Method

__construct() public method

Create a new query instance
public __construct ( Jackalope\FactoryInterface $factory, string $statement, ObjectManager $objectManager = null, string $path = null )
$factory Jackalope\FactoryInterface the object factory
$statement string The statement for this query
$objectManager Jackalope\ObjectManager (can be omitted if you do not want to execute the query but just use it with a parser)
$path string If this query is loaded from workspace with QueryManager::getQuery(), path has to be provided here
    public function __construct(FactoryInterface $factory, $statement, ObjectManager $objectManager = null, $path = null)
    {
        $this->factory = $factory;
        $this->statement = $statement;
        $this->objectManager = $objectManager;
        $this->path = $path;
    }