Class SyncML_Command

Description

The SyncML_Command class provides a base class for handling all <SyncBody> commands.

A SyncML command is a protocol primitive. Each SyncML command specifies to a recipient an individual operation that is to be performed.

The SyncML_Command objects are hooked into the XML parser of the 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.

$Horde: framework/SyncML/SyncML/Command.php,v 1.4.10.13 2009/04/05 20:24:42 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /SyncML/SyncML/Command.php (line 27)


	
			
Direct descendents
Class Description
 class SyncML_Command_Alert The SyncML_Command_Alert class provides a SyncML implementation of the Alert command as defined in SyncML Representation Protocol, version 1.1, section 5.5.2.
 class SyncML_Command_Final The SyncML_Command_Final class provides a SyncML implementation of the Final command as defined in SyncML Representation Protocol, version 1.1, section 5.1.7.
 class SyncML_Command_Get The SyncML_Command_Get class provides a SyncML implementation of the Get command as defined in SyncML Representation Protocol, version 1.1, section 5.5.7.
 class SyncML_Command_Map The SyncML_Command_Map class provides a SyncML implementation of the Map command as defined in SyncML Representation Protocol, version 1.1, section 5.5.8.
 class SyncML_Command_Put The SyncML_Command_Put class provides a SyncML implementation of the Put command as defined in SyncML Representation Protocol, version 1.1, section 5.5.10.
 class SyncML_Command_Replace The SyncML_Command_Replace class provides a SyncML implementation of the Replace command as defined in SyncML Representation Protocol, version 1.1, section 5.5.11.
 class SyncML_Command_Status The SyncML_Command_Status class provides a SyncML implementation of the Status response as defined in SyncML Representation Protocol, version 1.1, section 5.4.
 class SyncML_Command_Sync The SyncML_Command_Sync class provides a SyncML implementation of the Sync command as defined in SyncML Representation Protocol, version 1.1, section 5.5.15.
 class SyncML_Command_SyncHdr The SyncML_Command_SyncHdr class provides a SyncML implementation of the SyncHdr as defined in SyncML Representation Protocol, version 1.1, section 5.2.2.
Variable Summary
Method Summary
 SyncML_Command SyncML_Command ( &$outputHandler, SyncML_XMLOutput $outputHandler)
 void characters (string $str)
 void endElement (string $uri, string $element)
 SyncML_Command &factory (string $command,  &$outputHandler, SyncML_XMLOutput $outputHandler)
 string getCommandName ()
 void handleCommand ([ $debug = false])
 void startElement (string $uri, string $element, array $attrs)
Variables
string $_chars = '' (line 58)

Buffer for the parsed character data.

integer $_cmdID (line 43)

The command ID (<CmdID>).

string $_cmdName (line 36)

Name of the command, like 'Put'.

Must be overwritten by a sub class.


Redefined in descendants as:
SyncML_XMLOutput $_outputHandler (line 65)

A SyncML_XMLOutput instance responsible for generating the output.

array $_stack = array() (line 51)

Stack for holding the XML elements during creation of the object from the XML event flow.

Methods
Constructor SyncML_Command (line 72)

Constructor.

SyncML_Command SyncML_Command ( &$outputHandler, SyncML_XMLOutput $outputHandler)
characters (line 117)

Character data handler for the XML parser, delegated from SyncML_ContentHandler::characters().

void characters (string $str)
  • string $str: The data string.
endElement (line 97)

End element handler for the XML parser, delegated from SyncML_ContentHandler::endElement().

void endElement (string $uri, string $element)
  • string $uri: The namespace URI of the element.
  • string $element: The element tag name.

Redefined in descendants as:
factory (line 154)

Attempts to return a concrete SyncML_Command instance based on $command.

  • return: The newly created concrete SyncML_Command instance, or false on error.
SyncML_Command &factory (string $command,  &$outputHandler, SyncML_XMLOutput $outputHandler)
  • string $command: The type of the concrete SyncML_Comment subclass to return.
  • SyncML_XMLOutput $outputHandler: A SyncML_XMLOutput object.
  • &$outputHandler
getCommandName (line 127)

Returns the command name this instance is reponsible for.

  • return: The command name this object is handling.
string getCommandName ()
handleCommand (line 138)

This method is supposed to implement the actual business logic of the command once the XML parsing is complete.

  • abstract:
void handleCommand ([ $debug = false])
  • $debug

Redefined in descendants as:
startElement (line 85)

Start element handler for the XML parser, delegated from SyncML_ContentHandler::startElement().

void startElement (string $uri, string $element, array $attrs)
  • string $uri: The namespace URI of the element.
  • string $element: The element tag name.
  • array $attrs: A hash with the element's attributes.

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:15:54 +0000 by phpDocumentor 1.4.3