Listens to a GET request to fetch the required attributes.

@return void
326439
public function listen() {
		$action = filter_input( INPUT_GET, 'action' );
		$nonce  = filter_input( INPUT_GET, 'nonce' );

		if ( $action === self::ACTION_NAME && wp_verify_nonce( $nonce, self::ACTION_NAME ) ) {
			$this->dismisser->dismiss();
		}
	}
568870
public function fetch() {

        $response = $this->get_response();
        $this->validate_response($response);
        $this->store_response($response);

        // We need to reset plugin manager's caches - the currently existing
        // singleton is not aware of eventually available updates we just fetched.
        \core_plugin_manager::reset_caches();
    }
613129
protected function fetchData()
    {
        if (null === $this->_lastScrollId) {
            //first query - do search
            $options = ['scroll' => $this->scrollWindow];
            if(!$this->query->orderBy) {
                $options['search_type'] = 'scan';
            }
            $result = $this->query->createCommand($this->db)->search($options);

            //if using "scan" mode, make another request immediately
            //(search request returned 0 results)
            if(!$this->query->orderBy) {
                $result = $this->query->createCommand($this->db)->scroll([
                    'scroll_id' => $result['_scroll_id'],
                    'scroll' => $this->scrollWindow,
                ]);
            }
        } else {
            //subsequent queries - do scroll
            $result = $this->query->createCommand($this->db)->scroll([
                'scroll_id' => $this->_lastScrollId,
                'scroll' => $this->scrollWindow,
            ]);
        }

        //get last scroll id
        $this->_lastScrollId = $result['_scroll_id'];

        //get data
        return $this->query->populate($result['hits']['hits']);
    }
488882
public function receiveMethod()
    {
        if ($requestMethod = (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : null) {
            $requestMethod = strtoupper($requestMethod);
        }

        return $requestMethod;
    }
357435
final public function populateByRequest() {

		$args = func_get_args();

		// all subclass binds
		$binds = static::getBinds();

		foreach ($binds as $property => $field) {

			// check that property is in the args or that args is not defined at all
			if (!count($args) or (isset($args[0]) and in_array($property, $args[0]))) {
				
				$type = $this->getPropertyType($property);
				
				if (Input::isSent($property) or 'bool' == $type) {
					
					// assign the value to this object property
					$this->__set($property, Input::get($property));
					
				}

			}

		}

	}
553646
protected function fetchAttributes()
	{
		$tokenData = $this->getAccessTokenData();
		$info = $this->makeSignedRequest('users.get.json', [
			'query' => [
				'uids' => $tokenData['params']['user_id'],
				//'fields' => '', // uid, first_name and last_name is always available
				'fields' => 'nickname, sex, bdate, city, country, timezone, photo, photo_medium, photo_big, photo_rec',
				'v' => self::API_VERSION,
			],
		]);

		$info = $info['response'][0];

		$this->attributes = $info;
		$this->attributes['id'] = $info['id'];
		$this->attributes['name'] = $info['first_name'] . ' ' . $info['last_name'];
		$this->attributes['url'] = 'http://vk.com/id' . $info['id'];

		if (!empty($info['nickname'])) {
			$this->attributes['username'] = $info['nickname'];
		} else {
			$this->attributes['username'] = 'id' . $info['id'];
		}

		$this->attributes['gender'] = $info['sex'] == 1 ? 'F' : 'M';

		if (!empty($info['timezone'])) {
			$this->attributes['timezone'] = timezone_name_from_abbr('', $info['timezone'] * 3600, date('I'));
		}

		return true;
	}
427237
protected function _get()
	{
		$id_path = $this->identifier_to_path( $this->identifier );
		$file = static::$path.$id_path.'.cache';
		if ( ! is_file($file) or ($size = filesize($file)) == 0)
		{
			return false;
		}

		$handle = fopen($file, 'r');
		if ( ! $handle)
		{
			return false;
		}

		// wait for a lock
		while( ! flock($handle, LOCK_SH));

		// read the session data
		$payload = fread($handle, $size);

		//release the lock
		flock($handle, LOCK_UN);

		// close the file
		fclose($handle);

		try
		{
			$this->unprep_contents($payload);
		}
		catch (\UnexpectedValueException $e)
		{
			return false;
		}

		return true;
	}
872315
public function get($attributes)
    {
        //get function args
        $argsAsArray = func_get_args();
        //is attributes passed as args is an array and count greater than 1
        if (!is_array($attributes) && count($argsAsArray) > 1) {
            //recalls itself to get attributes as array
            return call_user_func([get_class(), 'get'], $argsAsArray);
        }
        //if just args is not an array or comma separated list
        if (!is_array($attributes) && count($argsAsArray) == 1) {
            return isset($this->{$attributes}) ? $this->{$attributes} : null;
        }

        $attributesGet = [];
        foreach ($attributes as $attribute) {
            $attributesGet[$attribute] = isset($this->{$attribute}) ? $this->{$attribute} : null;
        }

        return $attributesGet;
    }
236453
public function sendRequest()
    {
        if ($this->getError()->hasError() && !$this->inProgress) {
            return;
        }

        if (class_exists($this->dispatcher)) {
            $dispatcherClass = $this->dispatcher;
            $dispatcher = new $dispatcherClass($this->instance->getQuery());
            if ($dispatcher instanceof AbstractDispatcher) {
                $this->inProgress = true;
                try {
                    $client = new \Zend\XmlRpc\Client($this->getUrl());

                    $config = $this->config->getRawConfig();
                    $sql = $this->instance->getQuery()->toString();
                    $limit = $this->instance->getQuery()->getLimit();
                    $offset = $this->instance->getQuery()->getOffset();

                    $di = $client->getProxy('DBInstance');
                    if ($this->method == 'getAvailableDrivers') {
                        $this->availableDrivers = $di->getAvailableDrivers();
                    } elseif ($this->method == 'getServerVersion') {
                        $res = $di->getServerVersion();
                        $this->serverVersion = isset($res['version']) ? $res['version'] : null;
                    } else {
                        $response = $di->getResult(
                            $config,
                            $sql,
                            $limit,
                            $offset,
                            $this->instance->getQuery()->isSingle(),
                            $this->getKey(),
                            'array'
                        );
                        $dispatcher->dispatch($response);
                    }

                    $this->inProgress = false;
                } catch (\Zend\XmlRpc\Client\Exception\HttpException $e) {
                    $this->getError()->setMessage($e->getMessage());
                    $this->inProgress = false;
                } catch (\Zend\XmlRpc\Client\Exception\FaultException $e) {
                    $this->getError()->setMessage($e->getMessage());
                    $this->inProgress = false;
                } catch (\Exception $e) {
                    $this->getError()->setMessage('Error server response');
                    $this->inProgress = false;
                }
            } else {
                $this->getError()->setMessage(sprintf(
                    'Dispatcher class must be instance of %s, %s given',
                    AbstractDispatcher::class,
                    (string) $this->dispatcher
                ));
            }
        } else {
            $this->getError()->setMessage(sprintf('Class %s not found', (string) $this->dispatcher));
        }
    }
627125
private function _request()
    {
        $res = $this->_client->request(
            $this->_method,
            $this->_endpoint . '?' . $this->_query_parameters,
            [
                'headers' => $this->_headers,
                'http_errors' => false
            ]
        );
        return array(
            'code' => $res->getStatusCode(),
            'body' => new SimpleXMLElement($res->getBody())
        );
    }
537795
public function get()
	{
		$view = $this->getView();

		$view->attributeData = $this->toArray( $view->item );
		$view->attributeBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->attributeBody .= $client->get();
		}

		return $this->render( $view );
	}
1156529
protected function fetchAttributes()
    {
        $this->attributes = $this->makeSignedRequest('me', [
            'query' => [
                'fields' => join(',', [
                    'id',
                    'name',
                    'link',
                    'email',
                    'verified',
                    'first_name',
                    'last_name',
                    'gender',
                    'birthday',
                    'hometown',
                    'location',
                    'locale',
                    'timezone',
                    'updated_time',
                ])
            ]
        ]);

        $this->attributes['photo_url'] = $this->baseApiUrl.$this->getId().'/picture?width=100&height=100';

        return true;
    }
702492
protected function doPostGetData()
    {
        foreach ($this->dataTransformers as $dataTransformer) {
            if ($dataTransformer instanceof PostGetDataTransformerInterface) {
                $dataTransformer->postGetData($this->config);
            }
        }
    }
1311979
public function loadHttpData() {
		parent::loadHttpData();
		
		/** @var \Nette\Http\Request $request */
		$request = $this->getContainer()->getByType('\Nette\Http\Request');
		$this->token = $request->getPost($this->getHtmlName() . "-token");
	}
1235665
public function onKernelRequest()
    {
        if (!is_null($this->host)) {
            $this->router->getContext()->setHost($this->host);
        }

        if (!is_null($this->portHttp)) {
            $this->router->getContext()->setHttpPort($this->portHttp);
        }

        if (!is_null($this->portHttps)) {
            $this->router->getContext()->setHttpsPort($this->portHttps);
        }
    }
773638
public function getRequestData()
    {
        parent::getRequestData();

        if ($this->getRequest() instanceof Request) {
            if (in_array($this->getRequest()->getMethod(), array('PUT', 'DELETE'))) {
                $this->requestData[$this->getRequest()->getMethod()] = $this->getRequest()->request->all();
            }
        }

        return $this->requestData;
    }
639990
protected function newRequest()
    {
        $req = new \stdClass;
        $req->attrs = new \stdClass();
        $req->attrs->request = [];
        $req->attrs->get = [];
        $req->attrs->post = [];
        $req->attrs->cookie = [];
        $req->attrs->server = [];
        $req->attrs->files = [];
        $req->attrs->session = null;
        $req->attrs->paramsDone = false;
        $req->attrs->inputDone = false;
        $req->attrs->input = new Input();
        $req->attrs->inputReaded = 0;
        $req->attrs->chunked = false;
        $req->upstream = $this;
        return $req;
    }