/** * 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) <*****@*****.**> */ public static function fromApps($registry) { $modelStates = []; foreach ($registry->getModels() as $modelName => $modelObj) { $modelStates[$modelName] = ModelState::fromModel($modelObj); } return static::createObject($modelStates); }