public static function currentAppsState($registry)
    {
        $modelStates = [];

        foreach ($registry->getModels() as $modelName => $modelObj) {
            $modelStates[$modelName] = ModelState::fromModel($modelObj);
        }

        return static::createObject($modelStates);
    }
public static function currentAppsState($registry)
    {
        $modelStates = [];

        foreach ($registry->getModels() as $modelName => $modelObj) {
            $modelStates[$modelName] = ModelState::fromModel($modelObj);
        }

        return static::createObject($modelStates);
    }
public static function currentAppsState ( $ registry ) { $ modelStates = [ ] ; foreach ( $ registry -> getModels ( ) as $ modelName => $ modelObj ) { $ modelStates [ $ modelName ] = ModelState :: fromModel ( $ modelObj ) ; } return static :: createObject ( $ modelStates ) ; }
Takes in an Registry and returns a ProjectState matching it.

@param Registry $registry

@return ProjectState

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>

@throws \Eddmash\PowerOrm\Exception\TypeError
Takes in an Registry and returns a ProjectState matching it .