public function initialize(array $get = [], array $post = [], array $cookie = [], array $files = [], array $server = [], $rawBody = null, array $globals = [])
    {
        $cookie = $this->removeSlashes($cookie);
        $get = $this->removeSlashes($get);
        $post = $this->removeSlashes($post);

        $this->cookie = new Bag($cookie);

        $this->server = new Bag($server);
        $this->header = new HeaderBag(array_merge($get, $post, $server));

        $this->languages = $this->header->languages();
        $this->language = reset($this->languages);

        $this->dir = $this->resolveDir();
        $this->path = $this->resolvePath();
        $this->baseName = $this->resolveBaseName();

        $this->query = new Bag($this->resolveParameters($get, $globals));

        $this->raw = (string) $rawBody;
        $this->body = new Bag($this->resolveBody($post));

        $this->files = new FilesBag($files);

        if (!empty($this->query['locale'])) {
            $this->language($this->query['locale']);
        }

        if (!empty($this->query['format'])) {
            $this->format($this->query['format']);
        }
    }
public function initialize(array $get = [], array $post = [], array $cookie = [], array $files = [], array $server = [], $rawBody = null, array $globals = [])
    {
        $cookie = $this->removeSlashes($cookie);
        $get = $this->removeSlashes($get);
        $post = $this->removeSlashes($post);

        $this->cookie = new Bag($cookie);

        $this->server = new Bag($server);
        $this->header = new HeaderBag(array_merge($get, $post, $server));

        $this->languages = $this->header->languages();
        $this->language = reset($this->languages);

        $this->dir = $this->resolveDir();
        $this->path = $this->resolvePath();
        $this->baseName = $this->resolveBaseName();

        $this->query = new Bag($this->resolveParameters($get, $globals));

        $this->raw = (string) $rawBody;
        $this->body = new Bag($this->resolveBody($post));

        $this->files = new FilesBag($files);

        if (!empty($this->query['locale'])) {
            $this->language($this->query['locale']);
        }

        if (!empty($this->query['format'])) {
            $this->format($this->query['format']);
        }
    }
public function initialize ( array $ get = [ ] , array $ post = [ ] , array $ cookie = [ ] , array $ files = [ ] , array $ server = [ ] , $ rawBody = null , array $ globals = [ ] ) { $ cookie = $ this -> removeSlashes ( $ cookie ) ; $ get = $ this -> removeSlashes ( $ get ) ; $ post = $ this -> removeSlashes ( $ post ) ; $ this -> cookie = new Bag ( $ cookie ) ; $ this -> server = new Bag ( $ server ) ; $ this -> header = new HeaderBag ( array_merge ( $ get , $ post , $ server ) ) ; $ this -> languages = $ this -> header -> languages ( ) ; $ this -> language = reset ( $ this -> languages ) ; $ this -> dir = $ this -> resolveDir ( ) ; $ this -> path = $ this -> resolvePath ( ) ; $ this -> baseName = $ this -> resolveBaseName ( ) ; $ this -> query = new Bag ( $ this -> resolveParameters ( $ get , $ globals ) ) ; $ this -> raw = ( string ) $ rawBody ; $ this -> body = new Bag ( $ this -> resolveBody ( $ post ) ) ; $ this -> files = new FilesBag ( $ files ) ; if ( ! empty ( $ this -> query [ 'locale' ] ) ) { $ this -> language ( $ this -> query [ 'locale' ] ) ; } if ( ! empty ( $ this -> query [ 'format' ] ) ) { $ this -> format ( $ this -> query [ 'format' ] ) ; } }
Initializes request properties

@param array  $get
@param array  $post
@param array  $cookie
@param array  $files
@param array  $server
@param string $rawBody
@param array  $globals
Initializes request properties