TimeSync/Sntp.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-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

Package: Zend\TimeSync
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

>VPropertyprivateinteger $_delay
Socket delay
Details
Type
integer
>VPropertyprotectedarray $_exceptions
inherited
Exceptions that might have occured
Inherited from: \Zend_TimeSync_Protocol::$$_exceptions
Details
Type
array
Inherited_from
\Zend_TimeSync_Protocol::$$_exceptions  
>VPropertyprotectedarray $_info = array()
inherited
Holds information passed/returned from timeserver
Inherited from: \Zend_TimeSync_Protocol::$$_info
Default valuearray()Details
Type
array
Inherited_from
\Zend_TimeSync_Protocol::$$_info  
>VPropertyprotectedinteger $_port = 37
Port number for this timeserver
Default value37Details
Type
integer
>VPropertyprotectedarray $_socket
inherited
Holds the current socket connection
Inherited from: \Zend_TimeSync_Protocol::$$_socket
Details
Type
array
Inherited_from
\Zend_TimeSync_Protocol::$$_socket  
>VPropertyprotectedstring $_timeserver
inherited
Hostname for timeserver
Inherited from: \Zend_TimeSync_Protocol::$$_timeserver
Details
Type
string
Inherited_from
\Zend_TimeSync_Protocol::$$_timeserver  

Methods

methodpublic__construct(string $timeserver, integer $port) : void

Class constructor, sets the timeserver and port number

Parameters
NameTypeDescription
$timeserverstring

Timeserver to connect to

$portinteger

Port of the timeserver when it differs from the default port

methodprotected_connect() : void
inherited

Connect to the specified timeserver.

Inherited from: \Zend_TimeSync_Protocol::_connect()
Throws
ExceptionDescription
\Zend_TimeSync_ExceptionWhen the connection failed
methodprotected_disconnect() : void
inherited

Disconnects from the peer, closes the socket.

Inherited from: \Zend_TimeSync_Protocol::_disconnect()
methodprotected_extract(string $result) : integer

Extracts the data returned from the timeserver

Parameters
NameTypeDescription
$resultstring

Data to extract

Returns
TypeDescription
integer
methodprotected_prepare() : array

Prepares the data that will be send to the timeserver

Returns
TypeDescription
array
methodprotected_read() : string

Reads the data returned from the timeserver

Returns
TypeDescription
string
methodprotected_write(string $data) : void

Writes data to to the timeserver

Parameters
NameTypeDescription
$datastring

Data to write to the timeserver

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

Query this timeserver without using the fallback mechanism

Inherited from: \Zend_TimeSync_Protocol::getDate()
Parameters
NameTypeDescription
$localestring | \Zend_Locale

(Optional) Locale

Returns
TypeDescription
\Zend_Date
methodpublicgetInfo() : array
inherited

Return information sent/returned from the timeserver

Inherited from: \Zend_TimeSync_Protocol::getInfo()
Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.0.0a12.