public static function ensureCallback(&$arg)
    {
        if ($arg instanceof \Closure) {
            return true;
        }
        if (is_array($arg) && sizeof($arg) === 2) {
            if (isset($arg[0]) && $arg[0] instanceof \PHPDaemon\WebSocket\Route) {
                if (isset($arg[1]) && is_string($arg[1]) && strncmp($arg[1], 'remote_', 7) === 0) {
                    return true;
                }
            }
        }
        $arg = null;
        return false;
    }
public static function ensureCallback(&$arg)
    {
        if ($arg instanceof \Closure) {
            return true;
        }
        if (is_array($arg) && sizeof($arg) === 2) {
            if (isset($arg[0]) && $arg[0] instanceof \PHPDaemon\WebSocket\Route) {
                if (isset($arg[1]) && is_string($arg[1]) && strncmp($arg[1], 'remote_', 7) === 0) {
                    return true;
                }
            }
        }
        $arg = null;
        return false;
    }
public static function ensureCallback ( & $ arg ) { if ( $ arg instanceof \ Closure ) { return true ; } if ( is_array ( $ arg ) && sizeof ( $ arg ) === 2 ) { if ( isset ( $ arg [ 0 ] ) && $ arg [ 0 ] instanceof \ PHPDaemon \ WebSocket \ Route ) { if ( isset ( $ arg [ 1 ] ) && is_string ( $ arg [ 1 ] ) && strncmp ( $ arg [ 1 ] , 'remote_' , 7 ) === 0 ) { return true ; } } } $ arg = null ; return false ; }
Ensures that the variable passed by reference holds a valid callback-function
If it doesn't, its value will be reset to null
@param  mixed &$arg Argument
@return boolean
Ensures that the variable passed by reference holds a valid callback - function If it doesn t its value will be reset to null