public function getModelsFromResult($modelResult)
    {
        $modelsArray = [];

        if (isset($modelResult['models'])) {
            foreach ($modelResult['models'] as $model) {
                $model = new Model($model);
                $modelsArray[] = $model;
            }
        } else {
            throw new \Exception('Models Not Found');
        }

        return $modelsArray;
    }
public function getModelsFromResult($modelResult)
    {
        $modelsArray = [];

        if (isset($modelResult['models'])) {
            foreach ($modelResult['models'] as $model) {
                $model = new Model($model);
                $modelsArray[] = $model;
            }
        } else {
            throw new \Exception('Models Not Found');
        }

        return $modelsArray;
    }
public function getModelsFromResult ( $ modelResult ) { $ modelsArray = [ ] ; if ( isset ( $ modelResult [ 'models' ] ) ) { foreach ( $ modelResult [ 'models' ] as $ model ) { $ model = new Model ( $ model ) ; $ modelsArray [ ] = $ model ; } } else { throw new \ Exception ( 'Models Not Found' ) ; } return $ modelsArray ; }
Parses Request Result and gets Models

@param $modelResult

@return Model[]

@throws \Exception
Parses Request Result and gets Models