public static function retrieve(array $server = null)
    {
        if (empty($server)) {
            $server = $_SERVER;
        }

        $port = '80';

        if (isset($server['SERVER_PORT'])) {
            $port = $server['SERVER_PORT'];
        }

        return (int) $port;
    }