Pantheon\Terminus\Collections\SSHKeys::fetch PHP Method

fetch() public method

Fetches model data from API and instantiates its model instances
public fetch ( array $options = [] ) : SSHKeys
$options array params to pass to url request
return SSHKeys $this
    public function fetch(array $options = [])
    {
        $results = $this->getCollectionData($options);
        foreach ($results as $uuid => $ssh_key) {
            $model_data = (object) ['id' => $uuid, 'key' => $ssh_key];
            $this->add($model_data);
        }
        return $this;
    }