public static function collectionToModel($collection) {
		if (is_string($collection)) {
			return \Factory::model($collection);
		} else if (!empty($collection['model'])) {
			return new \Object\Collection(['data' => $collection, 'skip_acl' => $collection['skip_acl'] ?? false]);
		} else {
			return null;
		}
	}
public static function collectionToModel($collection) {
		if (is_string($collection)) {
			return \Factory::model($collection);
		} else if (!empty($collection['model'])) {
			return new \Object\Collection(['data' => $collection, 'skip_acl' => $collection['skip_acl'] ?? false]);
		} else {
			return null;
		}
	}
public static function collectionToModel ( $ collection ) { if ( is_string ( $ collection ) ) { return \ Factory :: model ( $ collection ) ; } else if ( ! empty ( $ collection [ 'model' ] ) ) { return new \ Object \ Collection ( [ 'data' => $ collection , 'skip_acl' => $ collection [ 'skip_acl' ] ?? false ] ) ; } else { return null ; } }
Convert collection to model

@param mixed $collection
@return boolean|\\Object\Collection
Convert collection to model