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) : voidClass 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() : voidDisconnects from the peer, closes the socket.
Inherited from: \Zend_TimeSync_Protocol::_disconnect()
_extract(string $result) : integerExtracts the data returned from the timeserver
| Name | Type | Description |
|---|---|---|
| $result | string | Data to extract |
| Type | Description |
|---|---|
| integer |

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

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

getDate(string | \Zend_Locale $locale = null) : \Zend_DateQuery 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() : arrayReturn information sent/returned from the timeserver
Inherited from: \Zend_TimeSync_Protocol::getInfo()| Type | Description |
|---|---|
| array |