src/Permissions/PermissionFactory.php
public static function createFromData($permissions)
    {
        return array_map(function ($permission) {
            if (is_array($permission)) {
                return PermissionFactory::createFromArray($permission);
            } else {
                return PermissionFactory::createFromObject($permission);
            }
        }, $permissions);
    }
public static function createFromData($permissions)
    {
        return array_map(function ($permission) {
            if (is_array($permission)) {
                return PermissionFactory::createFromArray($permission);
            } else {
                return PermissionFactory::createFromObject($permission);
            }
        }, $permissions);
    }
public static function createFromData ( $ permissions ) { return array_map ( function ( $ permission ) { if ( is_array ( $ permission ) ) { return PermissionFactory :: createFromArray ( $ permission ) ; } else { return PermissionFactory :: createFromObject ( $ permission ) ; } } , $ permissions ) ; }
Maps an array of permission data to Permission objects

@param array $permissions
@return \BeatSwitch\Lock\Permissions\Permission[]
Maps an array of permission data to Permission objects