magic-core
[ class tree: magic-core ] [ index: magic-core ] [ all elements ]

Class: ServerUtil

Source Location: /core/util/ServerUtil.php

Class Overview


リクエストから取得したサーバー情報を提供するクラスです.


Author(s):

  • T.Okumura

Version:

  • 1.0.0

Methods



Class Details

[line 18]
リクエストから取得したサーバー情報を提供するクラスです.

$_SERVERに対する操作と、その他の情報を提供します。




Tags:

author:  T.Okumura
version:  1.0.0
final:  


[ Top ]


Class Methods


static method get [line 30]

static mixed get( string $key)

$_SERVERから値を取得します.



Tags:

return:  取得できた場合はその値、できなければFALSE
access:  public


Parameters:

string   $key   取得する値のキー

[ Top ]

static method getAll [line 42]

static array getAll( )

すべての$_SERVERを取得します.

返されるのは$_SERVERのコピーです。
これによって返された配列に変更を加えても、元の$_SERVERの内容は変更されない事に注意してください。




Tags:

return:  コピーされた$_SERVERの配列
access:  public


[ Top ]

static method getBaseUrl [line 80]

static string getBaseUrl( )

スキームとホスト名を連結した文字列を取得します.



Tags:

return:  スキームとホスト名を連結した文字列
access:  public


[ Top ]

static method getHttpHost [line 63]

static string getHttpHost( )

ホスト名を取得します.

各スキームのデフォルトポートが使用されている場合はホスト名のみを返します。
特別なポートが指定されている場合は、ポート番号も併せて返されます。




Tags:

return:  ホスト名
access:  public


[ Top ]

static method getScheme [line 51]

static string getScheme( )

スキームを取得します.



Tags:

return:  スキーム(httpまたはhttps)
access:  public


[ Top ]


Documentation generated on Fri, 16 Dec 2011 11:13:57 +0100 by phpDocumentor 1.4.3