public function setServerInfo(array $info)
    {
        $this->server = $info;

        if (isset($info['name']) && $info['name']) $name = (string) $info['name'];
        else $name = sprintf('%s:%s', $info['host'], $info['port']);

        $this->setServerGlobal('SERVER_NAME', $name);

        $this->setServerGlobal('SERVER_ADDR', (string) $info['host']);
        $this->setServerGlobal('SERVER_PORT', (string) $info['port']);
        $this->setServerGlobal('SERVER_PROTOCOL', (string) $info['proto']);

        //TODO: Version Server
        $this->setServerGlobal('SERVER_SOFTWARE', 'Skeetr/0.0.2');
    }
public function setServerInfo(array $info)
    {
        $this->server = $info;

        if (isset($info['name']) && $info['name']) $name = (string) $info['name'];
        else $name = sprintf('%s:%s', $info['host'], $info['port']);

        $this->setServerGlobal('SERVER_NAME', $name);

        $this->setServerGlobal('SERVER_ADDR', (string) $info['host']);
        $this->setServerGlobal('SERVER_PORT', (string) $info['port']);
        $this->setServerGlobal('SERVER_PROTOCOL', (string) $info['proto']);

        //TODO: Version Server
        $this->setServerGlobal('SERVER_SOFTWARE', 'Skeetr/0.0.2');
    }
public function setServerInfo ( array $ info ) { $ this -> server = $ info ; if ( isset ( $ info [ 'name' ] ) && $ info [ 'name' ] ) $ name = ( string ) $ info [ 'name' ] ; else $ name = sprintf ( '%s:%s' , $ info [ 'host' ] , $ info [ 'port' ] ) ; $ this -> setServerGlobal ( 'SERVER_NAME' , $ name ) ; $ this -> setServerGlobal ( 'SERVER_ADDR' , ( string ) $ info [ 'host' ] ) ; $ this -> setServerGlobal ( 'SERVER_PORT' , ( string ) $ info [ 'port' ] ) ; $ this -> setServerGlobal ( 'SERVER_PROTOCOL' , ( string ) $ info [ 'proto' ] ) ; //TODO: Version Server $ this -> setServerGlobal ( 'SERVER_SOFTWARE' , 'Skeetr/0.0.2' ) ; }
Sets the server info

@param string $info mandatory keys: name, addr, port and proto
Sets the server info