Jackalope\Query\QOM\QueryObjectModelFactory::selector PHP Method

selector() public method

{@inheritDoc}
public selector ( $selectorName, $nodeTypeName )
    public function selector($selectorName, $nodeTypeName)
    {
        return new Selector($selectorName, $nodeTypeName);
    }

Usage Example

 /**
  * @expectedException \PHPCR\Query\InvalidQueryException
  */
 public function testDescendantQueryTrailingSlash()
 {
     $this->nodeTypeManager->expects($this->once())->method('getSubtypes')->will($this->returnValue(array()));
     $query = $this->factory->createQuery($this->factory->selector('nt:unstructured', 'nt:unstructured'), $this->factory->descendantNode('nt:unstructured', '/some/node/'));
     $this->walker->walkQOMQuery($query);
 }