protected function compileComponent(Builder $query, $components, $component)
    {
        $cypher = '';

        // Let's make sure this is a proprietary component that we support
        if ( ! in_array($component, $components))
        {
            throw new InvalidCypherGrammarComponentException($component);
        }

        // To compile the query, we'll spin through each component of the query and
        // see if that component exists. If it does we'll just call the compiler
        // function for the component which is responsible for making the Cypher.
        if ( ! is_null($query->$component))
        {
            $method = 'compile'.ucfirst($component);

            $cypher = $this->$method($query, $query->$component);
        }

        return $cypher;
    }
protected function compileComponent(Builder $query, $components, $component)
    {
        $cypher = '';

        // Let's make sure this is a proprietary component that we support
        if ( ! in_array($component, $components))
        {
            throw new InvalidCypherGrammarComponentException($component);
        }

        // To compile the query, we'll spin through each component of the query and
        // see if that component exists. If it does we'll just call the compiler
        // function for the component which is responsible for making the Cypher.
        if ( ! is_null($query->$component))
        {
            $method = 'compile'.ucfirst($component);

            $cypher = $this->$method($query, $query->$component);
        }

        return $cypher;
    }
protected function compileComponent ( Builder $ query , $ components , $ component ) { $ cypher = '' ; // Let's make sure this is a proprietary component that we support if ( ! in_array ( $ component , $ components ) ) { throw new InvalidCypherGrammarComponentException ( $ component ) ; } // To compile the query, we'll spin through each component of the query and // see if that component exists. If it does we'll just call the compiler // function for the component which is responsible for making the Cypher. if ( ! is_null ( $ query -> $ component ) ) { $ method = 'compile' . ucfirst ( $ component ) ; $ cypher = $ this -> $ method ( $ query , $ query -> $ component ) ; } return $ cypher ; }
Compile a single component.

@param  \Illuminate\Database\Query\Builder $query
@param  array $components
@param  string $component
@return string
Compile a single component .