Horde_Timezone::__construct PHP Method

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array List of optional class parameters. Possible options: - location: (string) Location of the timezone database, defaults to ftp.iana.org/tz/tzdata-latest.tar.gz. - client: (Horde_Http_Client) A preconfigured HTTP client for downloading via HTTP. - temp: (string) Temporary directory. - cache: (Horde_Cache) A cache object. - cachettl: (integer) Cache lifetime in seconds, defaults to 7 days.
    public function __construct(array $params = array())
    {
        $this->_params = array_merge(array('location' => 'ftp://ftp.iana.org/tz/tzdata-latest.tar.gz', 'cachettl' => 604800), $params);
    }

Usage Example

Example #1
0
 public function __construct($zone)
 {
     parent::__construct();
     $this->_zone = $zone;
 }