PHP Class 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.
Author: Anthony Mills ([email protected])
Author: Jan Schneider ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_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.

Méthodes publiques

Méthode Description
__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().

Method Details

__construct() public méthode

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

characters() public méthode

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

endElement() public méthode

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() public méthode

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.
Résultat Horde_SyncMl_Command The newly created concrete Horde_SyncMl_Command instance, or false on error.

getCommandName() public méthode

Returns the command name this instance is reponsible for.
public getCommandName ( ) : string
Résultat string The command name this object is handling.

handleCommand() public méthode

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

startElement() public méthode

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.

Property Details

$_chars protected_oe property

Buffer for the parsed character data.
protected string $_chars
Résultat string

$_cmdID protected_oe property

The command ID ().
protected int $_cmdID
Résultat integer

$_cmdName protected_oe property

Must be overwritten by a sub class.
protected string $_cmdName
Résultat string

$_outputHandler protected_oe property

A Horde_SyncMl_XmlOutput instance responsible for generating the output.
protected Horde_SyncMl_XmlOutput $_outputHandler
Résultat Horde_SyncMl_XmlOutput

$_stack protected_oe property

Stack for holding the XML elements during creation of the object from the XML event flow.
protected array $_stack
Résultat array