TimeSync/Sntp.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_TimeSync
- Version
- $Id: Sntp.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_TimeSync_Sntp
SNTP Protocol handling class
- Parent(s)
- \Zend_TimeSync_Protocol
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


array $_info = array()
Holds information passed/returned from timeserver
Inherited from: \Zend_TimeSync_Protocol::$$_infoarray()
Details- Type
- array
- Inherited_from
- \Zend_TimeSync_Protocol::$$_info
Methods


__construct(string $timeserver, integer $port) : void
Class constructor, sets the timeserver and port number
Name | Type | Description |
---|---|---|
$timeserver | string | Timeserver to connect to |
$port | integer | Port of the timeserver when it differs from the default port |


_disconnect() : void
Disconnects from the peer, closes the socket.
Inherited from: \Zend_TimeSync_Protocol::_disconnect()

_extract(string $result) : integer
Extracts the data returned from the timeserver
Name | Type | Description |
---|---|---|
$result | string | Data to extract |
Type | Description |
---|---|
integer |


_prepare() : array
Prepares the data that will be send to the timeserver
Type | Description |
---|---|
array |


_write(string $data) : void
Writes data to to the timeserver
Name | Type | Description |
---|---|---|
$data | string | Data to write to the timeserver |


getDate(string | \Zend_Locale $locale = null) : \Zend_Date
Query this timeserver without using the fallback mechanism
Inherited from: \Zend_TimeSync_Protocol::getDate()Name | Type | Description |
---|---|---|
$locale | string | \Zend_Locale | (Optional) Locale |
Type | Description |
---|---|
\Zend_Date |


getInfo() : array
Return information sent/returned from the timeserver
Inherited from: \Zend_TimeSync_Protocol::getInfo()Type | Description |
---|---|
array |