PHP Класс Horde_SyncMl_Command, horde

A SyncML command is a protocol primitive. Each SyncML command specifies to a recipient an individual operation that is to be performed. The Horde_SyncMl_Command objects are hooked into the XML parser of the Horde_SyncMl_ContentHandler class and are reponsible for parsing a single command inside the SyncBody section of a SyncML message. All actions that must be executed for a single SyncML command are handled by these objects, by means of the handleCommand() method. Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Anthony Mills ([email protected])
Автор: Jan Schneider ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_chars string Buffer for the parsed character data.
$_cmdID integer The command ID ().
$_cmdName string Must be overwritten by a sub class.
$_outputHandler Horde_SyncMl_XmlOutput A Horde_SyncMl_XmlOutput instance responsible for generating the output.
$_stack array Stack for holding the XML elements during creation of the object from the XML event flow.

Открытые методы

Метод Описание
__construct ( Horde_SyncMl_XmlOutput &$outputHandler ) Constructor.
characters ( string $str ) Character data handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::characters().
endElement ( string $uri, string $element ) End element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::endElement().
factory ( string $command, Horde_SyncMl_XmlOutput &$outputHandler ) : Horde_SyncMl_Command Attempts to return a concrete Horde_SyncMl_Command instance based on $command.
getCommandName ( ) : string Returns the command name this instance is reponsible for.
handleCommand ( $debug = false ) This method is supposed to implement the actual business logic of the command once the XML parsing is complete.
startElement ( string $uri, string $element, array $attrs ) Start element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::startElement().

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Horde_SyncMl_XmlOutput &$outputHandler )
$outputHandler Horde_SyncMl_XmlOutput A Horde_SyncMl_XmlOutput object.

characters() публичный Метод

Character data handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::characters().
public characters ( string $str )
$str string The data string.

endElement() публичный Метод

End element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::endElement().
public endElement ( string $uri, string $element )
$uri string The namespace URI of the element.
$element string The element tag name.

factory() публичный Метод

Attempts to return a concrete Horde_SyncMl_Command instance based on $command.
public factory ( string $command, Horde_SyncMl_XmlOutput &$outputHandler ) : Horde_SyncMl_Command
$command string The type of the concrete Horde_SyncMl_Comment subclass to return.
$outputHandler Horde_SyncMl_XmlOutput A Horde_SyncMl_XmlOutput object.
Результат Horde_SyncMl_Command The newly created concrete Horde_SyncMl_Command instance, or false on error.

getCommandName() публичный Метод

Returns the command name this instance is reponsible for.
public getCommandName ( ) : string
Результат string The command name this object is handling.

handleCommand() публичный Метод

This method is supposed to implement the actual business logic of the command once the XML parsing is complete.
public handleCommand ( $debug = false )

startElement() публичный Метод

Start element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::startElement().
public startElement ( string $uri, string $element, array $attrs )
$uri string The namespace URI of the element.
$element string The element tag name.
$attrs array A hash with the element's attributes.

Описание свойств

$_chars защищенное свойство

Buffer for the parsed character data.
protected string $_chars
Результат string

$_cmdID защищенное свойство

The command ID ().
protected int $_cmdID
Результат integer

$_cmdName защищенное свойство

Must be overwritten by a sub class.
protected string $_cmdName
Результат string

$_outputHandler защищенное свойство

A Horde_SyncMl_XmlOutput instance responsible for generating the output.
protected Horde_SyncMl_XmlOutput $_outputHandler
Результат Horde_SyncMl_XmlOutput

$_stack защищенное свойство

Stack for holding the XML elements during creation of the object from the XML event flow.
protected array $_stack
Результат array