public function freshen()
    {
        if (! isset($this->endpoints['all'])) {
            return \React\Promise\reject(new \Exception('You cannot freshen this repository.'));
        }

        $deferred = new Deferred();

        $this->http->get(
            $this->replaceWithVariables(
                $this->endpoints['all']
            )
        )->then(function ($response) {
            $this->fill([]);

            foreach ($response as $value) {
                $value = array_merge($this->vars, (array) $value);
                $part = $this->factory->create($this->part, $value, true);

                $this->push($part);
            }
        }, function ($e) use ($deferred) {
            $deferred->reject($e);
        });
    }
public function freshen()
    {
        if (! isset($this->endpoints['all'])) {
            return \React\Promise\reject(new \Exception('You cannot freshen this repository.'));
        }

        $deferred = new Deferred();

        $this->http->get(
            $this->replaceWithVariables(
                $this->endpoints['all']
            )
        )->then(function ($response) {
            $this->fill([]);

            foreach ($response as $value) {
                $value = array_merge($this->vars, (array) $value);
                $part = $this->factory->create($this->part, $value, true);

                $this->push($part);
            }
        }, function ($e) use ($deferred) {
            $deferred->reject($e);
        });
    }
public function freshen ( ) { if ( ! isset ( $ this -> endpoints [ 'all' ] ) ) { return \ React \ Promise \ reject ( new \ Exception ( 'You cannot freshen this repository.' ) ) ; } $ deferred = new Deferred ( ) ; $ this -> http -> get ( $ this -> replaceWithVariables ( $ this -> endpoints [ 'all' ] ) ) -> then ( function ( $ response ) { $ this -> fill ( [ ] ) ; foreach ( $ response as $ value ) { $ value = array_merge ( $ this -> vars , ( array ) $ value ) ; $ part = $ this -> factory -> create ( $ this -> part , $ value , true ) ; $ this -> push ( $ part ) ; } } , function ( $ e ) use ( $ deferred ) { $ deferred -> reject ( $ e ) ; } ) ; }
Freshens the repository collection.

@return \React\Promise\Promise
Freshens the repository collection .