{@inheritdoc}

@param FlowQuery $flowQuery the FlowQuery object
@param array $arguments the property path to use (in index 0)
@return mixed
766729
public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        if (!isset($arguments[0]) || empty($arguments[0]) || !is_string($arguments[0])) {
            throw new FlowQueryException('property() must be given an attribute name when used on objects, fetching all attributes is not supported.', 1332492263);
        }

        $context = $flowQuery->getContext();
        if (!isset($context[0])) {
            return null;
        }

        $element = $context[0];
        $propertyPath = $arguments[0];
        return ObjectAccess::getPropertyPath($element, $propertyPath);
    }
727661
public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        if (!isset($arguments[0]) || empty($arguments[0])) {
            return;
        }

        if ($arguments[0] instanceof NodeInterface) {
            $filteredContext = [];
            $context = $flowQuery->getContext();
            foreach ($context as $element) {
                if ($element === $arguments[0]) {
                    $filteredContext[] = $element;
                    break;
                }
            }
            $flowQuery->setContext($filteredContext);
        } else {
            parent::evaluate($flowQuery, $arguments);
        }
    }
1218563
public function sendWriteQuery($query, array $parameters = array())
    {
        return $this->sendCypherQuery($query, $parameters, $this->getWriteConnection()->getAlias(), self::WRITE_QUERY);
    }
288002
public function query($id, $method, array $arguments = null)
    {
        $this->client->query($id, $method, $arguments);

        return $this;
    }
93401
public function triggerFlow(array $flow, ...$args)
    {
        foreach ($flow as $i => $step) {
            //subflows will trigger separately
            if (is_array($step)) {
                continue;
            }

            //rule the subtasks first
            $j = 1;

            while (isset($flow[$i + $j]) && is_array($flow[$i + $j])) {
                //subflows should have
                //an event and a handler
                if (count($flow[$i + $j]) > 1) {
                    //the subflow is valid
                    //extract the event out
                    $event = array_shift($flow[$i + $j]);
                    self::$flows[$event] = $flow[$i + $j];
                }

                $j++;
            }

            //now trigger the event
            $this->trigger($step, ...$args);

            self::$flows = [];

            //analyze the meta
            $meta = $this->getEventHandler()->getMeta();

            //if status is incomplete
            if ($meta === EventHandler::STATUS_INCOMPLETE) {
                //we should also stop the flow
                break;
            }
        }

        return $this;
    }
689915
public function RunQuery(\Google\Cloud\Firestore\V1\RunQueryRequest $argument,
      $metadata = [], $options = []) {
        return $this->_serverStreamRequest('/google.firestore.v1.Firestore/RunQuery',
        $argument,
        ['\Google\Cloud\Firestore\V1\RunQueryResponse', 'decode'],
        $metadata, $options);
    }
1045300
public function sendReadQuery($query, array $parameters = array())
    {
        return $this->sendCypherQuery($query, $parameters, $this->getReadConnection()->getAlias(), self::READ_QUERY);
    }
1253033
public function query($id, $method, array $arguments)
    {
        $message = array(
            'jsonrpc' => self::VERSION,
            'id' => $id,
            'method' => $method
        );

        if ($arguments !== null) {
            $message['params'] = $arguments;
        }

        $this->messages[] = $message;
        return $this;
    }
1161216
public function load(FlowInterface $flow, array $entry)
    {
        $this->registerFlow($flow);
        $flowId                    = $flow->getId();
        static::$registry[$flowId] = $entry;

        foreach ($flow->getNodes() as $node) {
            $this->registerNode($node);
        }

        return $this;
    }
199504
public function query(array $arguments = [])
    {
        $adaptees = get_terms(['taxonomy' => $this->getSlug()]);

        return $this->plugger
            ->setModel($this)
            ->setAdapter(Term::class)
            ->plugIn($adaptees)
            ->getConnected();
    }
44690
public function query(array $arguments = [])
    {
        return $this->plugger
            ->setModel($this)
            ->setAdapter(User::class)
            ->plugIn(get_users($arguments))
            ->getConnected();
    }
369301
public function query(array $arguments = [])
    {
        $options = array_merge([
            'hierarchical' => 'threaded',
        ], $arguments);

        return $this->plugger
            ->setModel($this)
            ->setAdapter(Comment::class)
            ->plugIn(get_comments($options))
            ->getConnected();
    }
981566
public function buildQueryString($args = array()) {
		$args = array_merge($args, array("token" => $this->token));
		
		$query = "";
		if (isset($args)) {
			while (list($key, $val) = each($args)) {
				if ( strlen($query) > 0 ) {
					$query .= "&";
				} else {
					$query .= "?";
				}
				$query .= $key . '=' . $val;
			}
		}
		return $query;
	}
1162653
static function endpointHandler(RequestInterface $request) {
        $get_param = "workflow_key";
        $query_params = Util::getParamsFromRequest($request);

        if (isset($query_params[$get_param])) {
            // This is a script run request
            $result = self::runFromKey($query_params[$get_param]);
            return $result;
        } else {
            $workflows = DataStore::retrieveActiveWorkflows();
            $result = [];
            if ($workflows) {
                $url_path = $request->getUri()->getPath();
                foreach ($workflows as $flow) {
                    $flow_key = self::createWorkflowKeyFromConfig($flow);
                    $query_data = [
                        $get_param => $flow_key
                    ];
                    $result[] = Tasks::add($url_path, $query_data);
                }
                Tasks::flush();
            } else {
                syslog(LOG_WARNING, __METHOD__ . " could not find active workflows to schedule.");
            }
            return $result;
        }

    }
412426
public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        $output = [];
        $outputNodeAggregateIdentifiers = [];
        foreach ($flowQuery->getContext() as $contextNode) {
            /* @var $contextNode TraversableNodeInterface */
            try {
                $parentNode = $contextNode->findParentNode();
            } catch (NodeException $e) {
                continue;
            }
            if (!isset($outputNodeAggregateIdentifiers[(string)$parentNode->getNodeAggregateIdentifier()])) {
                $output[] = $parentNode;
                $outputNodeAggregateIdentifiers[(string)$parentNode->getNodeAggregateIdentifier()] = true;
            }
        }

        $flowQuery->setContext($output);

        if (isset($arguments[0]) && !empty($arguments[0])) {
            $flowQuery->pushOperation('filter', $arguments);
        }
    }
60809
public function insert($arguments = [])
    {
        $ar = null;
        $ar = self::cyrus();
        /*
         | Trigger Before create events if
         | defined by user into model class
         |
         */
        $this->triggerEvent('beforeCreate');

        // Build Sql Query and prepare it
        $sql = $this->getInsertQuery(strtoupper(__FUNCTION__), $ar, $arguments);

        try {
            $statement = $this->resolveConnection()->prepare($sql);
            static::$queries[] = $statement->queryString;

            // we will bind all parameters into the statement using execute method
            if ($return = $statement->execute($arguments)) {
                $ar->{$ar->getKeyName()} = (int) $this->resolveConnection()->lastInsertId();
                /*
                 | Trigger after create events if
                 | defined by user into model class
                 |
                 */
                $this->triggerEvent('afterCreate');

                return $return;
            }
        } catch (PDOException  $exception) {
            throw new \RuntimeException($exception->getMessage());
        }
    }
893927
public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        $output = [];
        $outputNodePaths = [];
        foreach ($flowQuery->getContext() as $contextNode) {
            foreach ($this->getNextForNode($contextNode) as $nextNode) {
                if ($nextNode !== null && !isset($outputNodePaths[(string)$nextNode->findNodePath()])) {
                    $outputNodePaths[(string)$nextNode->findNodePath()] = true;
                    $output[] = $nextNode;
                }
            }
        }
        $flowQuery->setContext($output);

        if (isset($arguments[0]) && !empty($arguments[0])) {
            $flowQuery->pushOperation('filter', $arguments);
        }
    }