Cria um novo PUSH
@param string $label
@param string $pushCallback
@param string $query
@param array $parameters
@return string Identificador do PUSH
433370
public function create($label, $pushCallback, $query, $parameters) {
        return (new \DOMXPath($this->webService->post("INSERT INTO 'PUSH'.'JOB'", array_merge($parameters, [
            self::PARAMETER_PUSH_LABEL => $label,
            self::PARAMETER_PUSH_QUERY => $query,
            self::PARAMETER_PUSH_CALLBACK => $pushCallback
        ]))))->evaluate("string(/BPQL/body/id)");
    }
684715
public function add_action(moodle_url $url, $label, $method = 'get') {

        $action = new stdClass();
        $action->url = $url;
        $action->label = $label;
        $action->method = $method;

        $this->actions[] = $action;
    }
1011963
public function push($topic, $idOrIdsOrResult = null, $result = null) {
        $this->checkPushService();
        $args = func_get_args();
        $argc = func_num_args();
        $id = null;
        $result = null;
        if (($argc < 2) || ($argc > 3)) {
            throw new Exception('Wrong number of arguments');
        }
        if ($argc === 2) {
            $result = $args[1];
        }
        else {
            $id = $args[1];
            $result = $args[2];
        }
        if ($id === null) {
            $topics = $this->getTopics($topic);
            $iterator = $topics->getIterator();
            while($iterator->valid()) {
                $id = $iterator->key();
                $this->internalPush($topic, $id, $result);
                $iterator->next();
            }
        }
        elseif (is_array($id)) {
            $ids = $id;
            foreach ($ids as $id) {
                $this->internalPush($topic, $id, $result);
            }
        }
        else {
            $this->internalPush($topic, $id, $result);
        }
    }
1022033
protected function createLabel($label)
    {
        if (!is_string($label)) {
            throw new InvalidArgumentException(
                "Provided label is not a string or an ElementInterface ".
                "interface object."
            );
        }

        $element = class_exists($label)
            ? $this->createLabelFromClass($label)
            : new Label('', $label);

        return $element;
    }
170708
public function post($query, Array $parameters = [], $autoParser = true) {
        curl_setopt_array($this->resource, [
            CURLOPT_POSTFIELDS => array_merge($parameters, [
                self::PARAMETER_QUERY => $query,
                self::PARAMETER_APIKEY => $this->apiKey
            ])
        ]);

        $dom = new \DOMDocument;
        $ret = curl_exec($this->resource);
        if (!$autoParser) return $ret;
        $dom->loadXML($ret);
        static::assert($dom);
        return $dom;
    }
897804
public function push($parameterKey, $value)
    {
        $array   = $this->get($parameterKey);
        $array[] = $value;

        $this->set($parameterKey, $array);
    }
398267
public function batchActionSnapshot($query)
    {
        if (false === $this->get('sonata.page.admin.snapshot')->isGranted('CREATE')) {
            throw new AccessDeniedException();
        }

        foreach ($query->execute() as $page) {
            $this->get('sonata.notification.backend')
                ->createAndPublish('sonata.page.create_snapshot', [
                    'pageId' => $page->getId(),
                ]);
        }

        return new RedirectResponse($this->admin->generateUrl('list', $this->admin->getFilterParameters()));
    }
560432
public function generateLabel(array $row, $label, DataContainer $dc, array $args): array
    {
        $manager = $this->getManager($row['source']);

        if (null !== ($tag = $manager->find($row['id']))) {
            $args[2] = $manager->countSourceRecords($tag);
        }

        return $args;
    }
1096695
public function breadcrumbAppend($name, $label, $route = null, array $parameters = [])
    {
        $this->createBreadcrumb();

        $this
            ->breadcrumb
            ->addChild($name, ['route' => $route, 'routeParameters' => $parameters])
            ->setLabel($label)
        ;
    }
1086412
function addInternalLink($label, $x0, $y0, $x1, $y1)
    {
        $this->numObj++;
        $info = array('type' => 'ilink', 'label' => $label, 'rect' => array($x0, $y0, $x1, $y1));
        $this->o_annotation($this->numObj, 'new', $info);
    }
376471
public void pushLoop(String labelName) {
        pushState();
        continueLabel = new Label();
        breakLabel = new Label();
        initLoopLabels(labelName);
    }
1089449
public function replaceQueryParameters($query, $parameters)
    {
        if ($parameters instanceof Data) {
            $parameters = $parameters->getValue(true);
        }

        $i = 0;

        if (! array_key_exists(0, $parameters) && array_key_exists(1, $parameters)) {
            $i = 1;
        }

        return preg_replace_callback(
            '/\?|((?<!:):[a-z0-9_]+)/i',
            static function ($matches) use ($parameters, &$i) {
                $key = substr($matches[0], 1);

                if (! array_key_exists($i, $parameters) && ($key === false || ! array_key_exists($key, $parameters))) {
                    return $matches[0];
                }

                $value  = array_key_exists($i, $parameters) ? $parameters[$i] : $parameters[$key];
                $result = DoctrineExtension::escapeFunction($value);
                $i++;

                return $result;
            },
            $query
        );
    }
1185054
public function pushQuery($query, array $parameters = array())
    {
        $this->checkIfOpened();
        try {
            $response = $this->handleResponse($this->client->pushToTransaction($this->transactionId, $query, $parameters, $this->conn));
            $result = $response->getResult();
            $this->results[] = $result;

            return $result;
        } catch(HttpException $e) {
            $this->rollback();
            throw $e;
        }

    }
1300204
public function execute($query, $parameters = [])
    {
        $statement = $this->link->prepare($query);
        $statement->execute($parameters);
        return $statement->rowCount();
    }
785423
public function replaceQueryParameters(string $query, $parameters): string
    {
        $values = $parameters;

        if ($parameters instanceof Data) {
            $values = $parameters->getValue(true);
        }

        $i = 0;

        if (!array_key_exists(0, $values) && array_key_exists(1, $values)) {
            $i = 1;
        }

        return preg_replace_callback(
            '/\?|((?<!:):[a-z0-9_]+)/i',
            static function ($matches) use ($values, &$i) {
                $key = substr($matches[0], 1);
                if (!array_key_exists($i, $values) && (!$key || !array_key_exists($key, $values))) {
                    return $matches[0];
                }

                $value = array_key_exists($i, $values) ? $values[$i] : $values[$key];
                $result = DoctrineExtension::escapeFunction($value);
                ++$i;

                return $result;
            },
            $query
        );
    }
391957
private function executeQuery(string $query, array $parameters) : bool
    {
        $statement = $this->pdo->prepare($query);
        $statement->execute($parameters);

        return $statement->rowCount() !== 0;
    }
1228200
public static function prependLabel($uri, $label)
    {
        $host = new Host(self::filterUri($uri)->getHost());
        if ($host->isDomain()) {
            return $uri->withHost((string) (new Domain($host))->prepend($label));
        }

        if ($host->isIpv4()) {
            $label = rtrim((string) new Host($label), '.');

            return $uri->withHost((string) $host->withContent($label.'.'.$host->getContent()));
        }

        throw new SyntaxError(sprintf('The URI host %s can not be prepended', (string) $host));
    }