src/Mmi/Cache/MemcacheHandler.php
private function _parseMemcacheAddress($link)
    {
        $protoSeparator = strpos($link, '://');
        if ($protoSeparator !== false) {
            $link = substr($link, $protoSeparator + 3);
        }
        $server = $link;
        $serverOptions = [];
        $hookSeparator = strpos($link, '?');
        if ($hookSeparator !== false) {
            $server = substr($link, 0, $hookSeparator);
            parse_str(substr($link, $hookSeparator + 1), $serverOptions);
        }
        $server = explode(':', $server);
        $serverOptions['host'] = $server[0];
        $serverOptions['port'] = $server[1];
        return $serverOptions;
    }
private function _parseMemcacheAddress($link)
    {
        $protoSeparator = strpos($link, '://');
        if ($protoSeparator !== false) {
            $link = substr($link, $protoSeparator + 3);
        }
        $server = $link;
        $serverOptions = [];
        $hookSeparator = strpos($link, '?');
        if ($hookSeparator !== false) {
            $server = substr($link, 0, $hookSeparator);
            parse_str(substr($link, $hookSeparator + 1), $serverOptions);
        }
        $server = explode(':', $server);
        $serverOptions['host'] = $server[0];
        $serverOptions['port'] = $server[1];
        return $serverOptions;
    }
private function _parseMemcacheAddress ( $ link ) { $ protoSeparator = strpos ( $ link , '://' ) ; if ( $ protoSeparator !== false ) { $ link = substr ( $ link , $ protoSeparator + 3 ) ; } $ server = $ link ; $ serverOptions = [ ] ; $ hookSeparator = strpos ( $ link , '?' ) ; if ( $ hookSeparator !== false ) { $ server = substr ( $ link , 0 , $ hookSeparator ) ; parse_str ( substr ( $ link , $ hookSeparator + 1 ) , $ serverOptions ) ; } $ server = explode ( ':' , $ server ) ; $ serverOptions [ 'host' ] = $ server [ 0 ] ; $ serverOptions [ 'port' ] = $ server [ 1 ] ; return $ serverOptions ; }
Parsuje adres serwera memcached
@param string $link źródło
@return array
Parsuje adres serwera memcached