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 license@zend.com so we can send you a copy immediately.
SNTP Protocol handling class

__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 |

_connect(
)
:
void
Connect to the specified timeserver.
Inherited from: \Zend_TimeSync_Protocol::_connect()Exception | Description |
---|---|
\Zend_TimeSync_Exception | When the connection failed |

_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 |