TimeSync/Protocol.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VPropertyprotectedarray $_exceptions
Exceptions that might have occured
Details
Type
array
>VPropertyprotectedarray $_info = array()
Holds information passed/returned from timeserver
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_socket
Holds the current socket connection
Details
Type
array
>VPropertyprotectedstring $_timeserver
Hostname for timeserver
Details
Type
string

Methods

methodprotected_connect() : void

Connect to the specified timeserver.

Throws
ExceptionDescription
\Zend_TimeSync_ExceptionWhen the connection failed
methodprotected_disconnect() : void

Disconnects from the peer, closes the socket.

methodprotected_extract(string | array $data) : integer
abstract

Abstract method that extracts the binary data returned from the timeserver

Parameters
NameTypeDescription
$datastring | array

Data returned from the timeserver

Returns
TypeDescription
integer
methodprotected_prepare() : mixed
abstract

Abstract method that prepares the data to send to the timeserver

Returns
TypeDescription
mixed
methodprotected_read() : mixed
abstract

Abstract method that reads the data returned from the timeserver

Returns
TypeDescription
mixed
methodprotected_write(string $data) : void
abstract

Abstract method that writes data to to the timeserver

Parameters
NameTypeDescription
$datastring

Data to write

methodpublicgetDate(string | \Zend_Locale $locale = null) : \Zend_Date

Query this timeserver without using the fallback mechanism

Parameters
NameTypeDescription
$localestring | \Zend_Locale

(Optional) Locale

Returns
TypeDescription
\Zend_Date
methodpublicgetInfo() : array

Return information sent/returned from the timeserver

Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.2.0 .