TimeSync/Protocol.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 license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_TimeSync
- Version
- $Id$
\Zend_TimeSync_Protocol
Package: Zend_TimeSync
Abstract class definition for all timeserver protocols
- Children
- \Zend_TimeSync_Sntp
- \Zend_TimeSync_Ntp
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
array $_info = array()
Holds information passed/returned from timeserver
Default value
array()
Details- Type
- array
Methods
_connect() : void
Connect to the specified timeserver.
Throws
Exception | Description |
---|---|
\Zend_TimeSync_Exception | When the connection failed |
_extract(string | array $data) : integer
abstract
Abstract method that extracts the binary data returned from the timeserver
Parameters
Returns
Name | Type | Description |
---|---|---|
$data | string | array | Data returned from the timeserver |
Type | Description |
---|---|
integer |
_prepare() : mixed
abstract
Abstract method that prepares the data to send to the timeserver
Returns
Type | Description |
---|---|
mixed |
_read() : mixed
abstract
Abstract method that reads the data returned from the timeserver
Returns
Type | Description |
---|---|
mixed |
_write(string $data) : void
abstract
Abstract method that writes data to to the timeserver
Parameters
Name | Type | Description |
---|---|---|
$data | string | Data to write |
getDate(string | \Zend_Locale $locale = null) : \Zend_Date
Query this timeserver without using the fallback mechanism
Parameters
Returns
Name | Type | Description |
---|---|---|
$locale | string | \Zend_Locale | (Optional) Locale |
Type | Description |
---|---|
\Zend_Date |