Services_Weather::service

Services_Weather::service() – サービスオブジェクトのファクトリ

Synopsis

require_once '/Weather.php';

PEAR_Error|object& Services_Weather::service ( string $service , array $options = = null )

Description

オプションの配列では、次のキーが使用できます。

  • debug デバッグ出力を有効にします。

--- 共通オプション

  • cacheType 使用するキャッシュの形式を指定します。

  • cacheOptions キャッシュのオプションを渡します。

  • unitsFormat (US)-standard、metric あるいは custom のいずれかです。

  • customUnitsFormat 独自の単位形式を定義します。

  • httpTimeout HTTP リクエストのタイムアウトを指定します。

  • dateFormat 日付の出力に使用する文字列。

  • timeFormat 時刻の出力に使用する文字列。

--- EJSE のオプション

  • なし

--- GlobalWeather のオプション

  • なし

--- METAR のオプション

  • dsn DB 接続を定義する文字列。

  • dbOptions DB に渡すオプション。

  • source http、ftp あるいは file - データソースの形式。

  • sourcePath データソースを URL と filepath のどちらから探すか。

--- weather.com のオプション

  • partnerID これらのキーは、

  • licenseKey weather.com XML サービスに登録した際に受け取ります。

Parameter

string $service

array $options

Throws

throws PEAR_Error

throws PEAR_Error::SERVICES_WEATHER_ERROR_SERVICE_NOT_FOUND

Note

This function can not be called statically.