Returns the ID of an observer with public = 1 and with similar request and params.

@param string $request
@param string $params
@return null|string
9061
private function _get_id(string $request, $params): ?string
  {
    if ( $this->check() ){
      if ( $params ){
        return $this->db->select_one('bbn_observers', 'id', [
          'id_string' => $this->_get_id_string($request, $params)
        ]);
      }
      return $this->db->get_one("
        SELECT id
        FROM bbn_observers
        WHERE `request` LIKE ?
        AND `params` IS NULL
        AND `public` = 1",
        $request);
    }
    return null;
  }
667041
public function EditForm($request = null)
    {
        // set page ID from request
        if ($request) {
            // Validate id is present
            $id = $request->param('ID');
            if (!isset($id)) {
                $this->httpError(400);
                return null;
            }
            $this->setCurrentPageID($id);
        }
        return $this->getEditForm();
    }
750262
private function _get_id_string(string $request, string $params = null): string
  {
    return md5($request.($params ?: ''));
  }
1175944
static function fromOpenIDRequest($request)
    {
        $obj = new Auth_OpenID_PAPE_Request();
        $args = $request->message->getArgs(Auth_OpenID_PAPE_NS_URI);

        if ($args === null || $args === array()) {
            return null;
        }

        $obj->parseExtensionArgs($args);
        return $obj;
    }
743299
public static int getInt(@NotNull ServletRequest request, @NotNull String param) {
    return getInt(request, param, 0);
  }
936894
protected function getResourceId(Request $request)
    {
        if ($resourceId = $request->get('viaResourceId')) {
            return $resourceId;
        };

        parse_str(parse_url($request->server->get('HTTP_REFERER'), PHP_URL_QUERY), $params);

        if ($resourceId = array_get($params, 'viaResourceId')) {
            return $resourceId;
        };

        if ($resourceId = $request->route('resourceId')) {
            return $resourceId;
        };

        return null;
    }
581137
public static function setter($request, $params)
    {
        if (is_array($params)) {
            foreach ($params as $property => $value) {
                $property = Utils::deleteUnderscore($property);
                $setter = 'set'.ucfirst($property);
                if (method_exists($request, $setter)) {
                    $request->$setter($value);
                } else {
                    throw new NavitiaCreationException(
                        sprintf(
                            'Neither property "%s" nor method "%s"'.
                            'nor method "%s" exist.',
                            $property,
                            'get'.ucfirst($property),
                            $setter
                        )
                    );
                }
            }
        } else {
            throw new NavitiaCreationException(
                sprintf(
                    'The parameter (type "%s") will be an Array',
                    gettype($params)
                )
            );
        }
        return $request;
    }
819886
protected function _dl($request, $params = [])
    {
        try {
            $youTube = new Client(['base_uri' => 'https://www.googleapis.com/youtube/v3/']);
            $params =  $params + ['key' => config('coaster::key.yt_server')];
            $response = $youTube->request('GET', $request, ['query' => $params]);
            $data = json_decode($response->getBody());
            return !empty($data) && !empty($data->items[0]) ? $data->items[0] : null;
        } catch (\Exception $e) {
            return null;
        }
    }
768804
protected function getCurrentUri(Request $request, array $parameters = [])
    {
        $params = $request->attributes->get('_route_params');

        return $this->generateUrl($request->attributes->get('_route'), array_merge($params, $parameters));
    }
393331
public function getUser(ServerRequestInterface $request)
    {
        $server = $request->getServerParams();
        if (!isset($server['PHP_AUTH_USER']) || !isset($server['PHP_AUTH_PW'])) {
            return null;
        }

        $username = $server['PHP_AUTH_USER'];
        $password = $server['PHP_AUTH_PW'];

        if (!is_string($username) || $username === '' || !is_string($password) || $password === '') {
            return null;
        }

        return $this->_identifier->identify([
            IdentifierInterface::CREDENTIAL_USERNAME => $username,
            IdentifierInterface::CREDENTIAL_PASSWORD => $password,
        ]);
    }
56906
protected function parseOperation($request = [], $params = [])
    {
        $meta = $params + compact('request');
        $method = $request['method'];
        //        $header = $request['header'];
        $body = $request['body'];
        $url = $request['url'];
        $data = [
            'httpMethod' => $method,
            'uri' => $this->parseUri($url, $meta),
            'responseModel' => 'getResponse',
            'parameters' => $this->parseParams($url, $body['raw'], $meta),
        ];
        return $data;

    }
152430
private function readToken(Request $request)
    {
        if (!$request->hasRedirectHeader('HTTP_AUTHORIZATION')) {
            return null;
        }

        return $request->readRedirectHeader('HTTP_AUTHORIZATION')
                ->withFilter(TokenFilter::instance());
    }
1136992
private function getRequestedPage(Request $request)
    {
        $pageNumber = $request->query->getInt('page', 1);
        if (!$pageNumber || $pageNumber < 1) {
            $pageNumber = 1;
        }

        return $pageNumber;
    }
1138096
public function indexAction(Request $request, $parameterBag = null)
    {

        $em = $this->getDoctrine()->getManager();

        $pageNumber = $request->get("page", 1);
        $filters = array();
        if ($parameterBag && isset($parameterBag["page"])) {
            $pageNumber = $parameterBag["page"];
        }

        $tag = null;
        if ($parameterBag && isset($parameterBag["tag"])) {
            $filters['tag'] = $parameterBag["tag"];
            $tag = $filters['tag'];
        }

        $qb = $this->getDoctrine()->getRepository("AmulenNewsBundle:Post")->findPublishedQueryBuilder($filters);
        $posts = $qb;
        $paginator = $this->get('knp_paginator');
        $pagination = $paginator->paginate($posts, $pageNumber, 10);

        return array(
            'tag' => $tag,
            'pagination' => $pagination,
        );
    }
1151566
public function getResponseParam($param) {
    if (isset($this->response[$param])) {
      return $this->response[$param];
    }
    return null;
  }
236331
public function post($request, $data = null, $params = null) {
        if (is_string ($request)) {
            $request = array(
                "uri" => $request,
                "data" => $data,
                "params" => $params
            );
        }

        $request["params"] = isset ($request["params"]) && is_array ($request["params"]) ? $request["params"] : array();

        if (!isset ($request["authenticate"]) || $request["authenticate"] !== false) {
            $request["params"]["access_token"] = $this->get_access_token();
        }

        $result = MPRestClient::post($request);
        return $result;
    }
572891
public function getResponseParam($param) {
    if (isset($this->notifyParams[$param])) {
      return $this->notifyParams[$param];
    }
    return NULL;
  }