public function find($parameters): array
    {
        if ($parameters instanceof Query) {
            $parameters = $parameters->compileParameters();
        }

        $parameters = $this->formatParameters($parameters, self::ENPOINT_COLLECTION);
        $url = $this->urlCollection.'/';

        $results = $this->client->loadResource($url, $parameters['parameters']);

        $models = [];
        foreach ($results as $result) {
            $models[] = new Model($this->name, $result);
        }

        return $models;
    }
public function find($parameters): array
    {
        if ($parameters instanceof Query) {
            $parameters = $parameters->compileParameters();
        }

        $parameters = $this->formatParameters($parameters, self::ENPOINT_COLLECTION);
        $url = $this->urlCollection.'/';

        $results = $this->client->loadResource($url, $parameters['parameters']);

        $models = [];
        foreach ($results as $result) {
            $models[] = new Model($this->name, $result);
        }

        return $models;
    }
public function find ( $ parameters ) : array { if ( $ parameters instanceof Query ) { $ parameters = $ parameters -> compileParameters ( ) ; } $ parameters = $ this -> formatParameters ( $ parameters , self :: ENPOINT_COLLECTION ) ; $ url = $ this -> urlCollection . '/' ; $ results = $ this -> client -> loadResource ( $ url , $ parameters [ 'parameters' ] ) ; $ models = [ ] ; foreach ( $ results as $ result ) { $ models [ ] = new Model ( $ this -> name , $ result ) ; } return $ models ; }
Finds a collection of models with the given parameters.

@param array|Query $parameters

@return Model[]
Finds a collection of models with the given parameters .