src/GraphBuilder.php
public function subquery( QueryBuilder $queryBuilder ) {
		$this->subqueries[] = $queryBuilder->getSPARQL( false );
		$this->usageValidator->trackDefinedVariables( implode( ' ', $queryBuilder->getSelects() ) );

		// @todo temp hack to add AS definitions to defined variables
		$regexHelper = new RegexHelper();
		$matches = $regexHelper->getMatches( 'AS \{variable}', implode( ' ', $queryBuilder->getSelects() ) );
		$this->usageValidator->trackDefinedVariables( $matches );

		return $this;
	}
public function subquery( QueryBuilder $queryBuilder ) {
		$this->subqueries[] = $queryBuilder->getSPARQL( false );
		$this->usageValidator->trackDefinedVariables( implode( ' ', $queryBuilder->getSelects() ) );

		// @todo temp hack to add AS definitions to defined variables
		$regexHelper = new RegexHelper();
		$matches = $regexHelper->getMatches( 'AS \{variable}', implode( ' ', $queryBuilder->getSelects() ) );
		$this->usageValidator->trackDefinedVariables( $matches );

		return $this;
	}
public function subquery ( QueryBuilder $ queryBuilder ) { $ this -> subqueries [ ] = $ queryBuilder -> getSPARQL ( false ) ; $ this -> usageValidator -> trackDefinedVariables ( implode ( ' ' , $ queryBuilder -> getSelects ( ) ) ) ; // @todo temp hack to add AS definitions to defined variables $ regexHelper = new RegexHelper ( ) ; $ matches = $ regexHelper -> getMatches ( 'AS \{variable}' , implode ( ' ' , $ queryBuilder -> getSelects ( ) ) ) ; $ this -> usageValidator -> trackDefinedVariables ( $ matches ) ; return $ this ; }
Adds the given subquery.

@param QueryBuilder $queryBuilder
@return self
@throws InvalidArgumentException
Adds the given subquery .