Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: CwSerializable

Source Location: /common/CwSerializable.php

Class Overview


Abstract class for all classes that can be serialized


Author(s):

Variables

Methods


Child classes:

Dimension
Represents an image's dimension
GeoDimension
Represents an image's dimension and bbox
Shape
Abstract class for shapes
Location
Position on a map
LayerState
Layer display state
InitialMapState
Initial display state for a mapfile
MapInfo
Main MapInfo class
Message
A class for messages
MapRequest
Request sent from client to server
MapResult
Result sent from server to client
ExportPdfInit
ExportPdf initialization information
LayerReorderInit
LayerReorderRequest
LayerTransparency
LayerInit
StyledShape
Shape with a style for the shape and the label
OutlineRequest
Outline request
OutlineResult
Outline result
OutlineInit
Outline initialization
OutlineDefaultValue
Default values of the outlined shape objects
Parameter
A parameter
RoutingRequest
Request
Attribute
An attribute
Step
Step for roadmap
RoutingResult
Result
EditRequest
Request
EditResult
Result
PositionOverlay
PositionOverlay
BasicOverlay
BasicOverlay
Image
An Image
Images
Images object common to requests and results, which contains all cartoweb images used during a map display.
LayerBase
Base class for layers
ChildrenSwitch
Class containing children for children switching
LayersRequest
A request for layers.
SwitchInit
Switch information
LayersInit
Layers initialization information. It contains all the layer related static information.
LocationRequest
Request information for plugin Location
LocationConstraint
Constraints for a location
LocationResult
Result information for plugin Location
LocationScale
Predefined scale for display in scales dropdown box
LocationShortcut
Predefined shortcut for display in shortcuts dropdown box
LocationInit
Location initialization information
RelativeLocationRequest
Basic location request
IdSelection
Describes a selection of a set of objects identified by their id's
RecenterLocationRequest
Location request for recentering on Ids
QueryRequest
QueryResult
TableFlags
Flags used in requests for querying tables
TableRow
A table row
Table
A table
TableGroup
A group of tables
SerializableTestClass1
Test class used to test abstract class CwSerializable (all types of attribute)
SerializableTestClass2
Test class used to test abstract class CwSerializable (simple)
ProjectLocationRequest
ProjectLocationResult
ProjectTableRequest
ProjectTableResult
ProjectpluginRequest
ProjectpluginResult
ProjectpluginInit

Class Details

[line 33]
Abstract class for all classes that can be serialized

CwSerializable classes are typically used to transfer objects through SOAP.




Tags:

abstract:  


[ Top ]


Class Variables

$className =

[line 38]



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 47]

CwSerializable __construct( )

Constructor

Stores class name to use it during object unserialization in CwSerializable::unserializeObject() or CwSerializable::unserializeObjectMap().




Tags:

access:  public


Overridden in child classes as:

Dimension::__construct()
Constructor
GeoDimension::__construct()
Constructor
Point::__construct()
Constructor
Bbox::__construct()
Constructor
Message::__construct()
Constructor
BasicOverlay::__construct()
Constructor
StyleOverlay::__construct()
Constructor
SerializableTestClass1::__construct()
Constructor

[ Top ]

method copyAllVars [line 186]

mixed copyAllVars( mixed $from_object, mixed $to_object)

Copy all properties from one object to another (overwriting previous ones)



Tags:

return:  The destination object, with copied properties
access:  private
static:  


Parameters:

mixed   $from_object   Source object to take properties from
mixed   $to_object   Destination object where properties are copied

[ Top ]

method getValue [line 65]

mixed getValue( stdClass $struct, string $property)

Returns structure's property value if property exists



Tags:

return:  value
static:  
access:  private


Parameters:

stdClass   $struct  
string   $property  

[ Top ]

method guessClassName [line 169]

string guessClassName( string $property)

Tries to guess the class to use from the property being unserialised.

It is useful when dealing with non-PHP clients who do not put "className" fields in requests, containing the object class to use. If the property name ends with "Request" or "Result", it is used as the class name.




Tags:

access:  private
static:  
throws:  CartoserverException if name could not be guessed


Parameters:

string   $property  

[ Top ]

method unserialize [line 57]

void unserialize( stdClass $struct)

Unserializes from a stdClass structure

Each subclass knows how to unserialize.




Tags:

abstract:  


Overridden in child classes as:

Dimension::unserialize()
GeoDimension::unserialize()
Shape::unserialize()
Point::unserialize()
Line::unserialize()
Bbox::unserialize()
Unserializes a Bbox
Rectangle::unserialize()
Polygon::unserialize()
Location::unserialize()
LayerState::unserialize()
InitialMapState::unserialize()
MapInfo::unserialize()
Message::unserialize()
Sets object properties from $struct data.
MapRequest::unserialize()
Sets object properties from $struct data.
MapResult::unserialize()
Sets object properties from $struct data.
ExportPdfInit::unserialize()
LayerReorderInit::unserialize()
LayerReorderRequest::unserialize()
LayerTransparency::unserialize()
LayerInit::unserialize()
StyledShape::unserialize()
OutlineRequest::unserialize()
OutlineResult::unserialize()
OutlineInit::unserialize()
OutlineDefaultValue::unserialize()
Parameter::unserialize()
RoutingRequest::unserialize()
Attribute::unserialize()
Step::unserialize()
RoutingResult::unserialize()
EditRequest::unserialize()
EditResult::unserialize()
PositionOverlay::unserialize()
BasicOverlay::unserialize()
ColorOverlay::unserialize()
StyleOverlay::unserialize()
LabelOverlay::unserialize()
ClassOverlay::unserialize()
MetadataOverlay::unserialize()
LayerOverlay::unserialize()
MapOverlay::unserialize()
Image::unserialize()
Images::unserialize()
LayerBase::unserialize()
LayerContainer::unserialize()
LayerGroup::unserialize()
Layer::unserialize()
ChildrenSwitch::unserialize()
LayersRequest::unserialize()
SwitchInit::unserialize()
LayersInit::unserialize()
LocationRequest::unserialize()
LocationConstraint::unserialize()
LocationResult::unserialize()
LocationScale::unserialize()
LocationShortcut::unserialize()
LocationInit::unserialize()
RelativeLocationRequest::unserialize()
BboxLocationRequest::unserialize()
PanLocationRequest::unserialize()
ZoomPointLocationRequest::unserialize()
IdSelection::unserialize()
QuerySelection::unserialize()
RecenterLocationRequest::unserialize()
QueryRequest::unserialize()
QueryResult::unserialize()
TableFlags::unserialize()
TableRow::unserialize()
Table::unserialize()
TableGroup::unserialize()
SerializableTestClass1::unserialize()
SerializableTestClass2::unserialize()
ProjectLocationRequest::unserialize()
ProjectLocationResult::unserialize()
ProjectTableRequest::unserialize()
ProjectTableResult::unserialize()
ProjectpluginRequest::unserialize()
ProjectpluginResult::unserialize()
ProjectpluginInit::unserialize()

Parameters:

stdClass   $struct   structure to unserialize

[ Top ]

method unserializeArray [line 115]

array unserializeArray( stdClass $struct, [string $property = NULL], [string $type = 'string'])

Returns an array of typed values

If structure property is a string, considers that it is an array serialized in a string (see CwSerializable::unserializeStringArray()).




Tags:

access:  public
static:  


Parameters:

stdClass   $struct  
string   $property  
string   $type  

[ Top ]

method unserializeObject [line 206]

mixed unserializeObject( stdClass $struct, [string $property = NULL], [string $className = NULL])

Returns an unserialized object from a stdClass structure

If object is an instance of Serializable, calls CwSerializable::unserialize(). If not, all structure's properties are copied into object.




Tags:

access:  public
static:  


Parameters:

stdClass   $struct  
string   $property  
string   $className  

[ Top ]

method unserializeObjectMap [line 243]

array unserializeObjectMap( stdClass $struct, [string $property = NULL], [string $className = NULL])

Returns an array of unserialized objects from a stdClass structure



Tags:

access:  public
static:  


Parameters:

stdClass   $struct  
string   $property  
string   $className  

[ Top ]

method unserializeStringArray [line 142]

array unserializeStringArray( stdClass $struct, string $property, [string $type = 'string'])

Returns an array of typed values from a string

Uses Utils::parseArray().




Tags:

access:  public
static:  


Parameters:

stdClass   $struct  
string   $property  
string   $type  

[ Top ]

method unserializeValue [line 86]

mixed unserializeValue( stdClass $struct, [string $property = NULL], [string $type = 'string'])

Returns a typed value from a structure property



Tags:

return:  value
access:  public
static:  


Parameters:

stdClass   $struct  
string   $property  
string   $type  

[ Top ]


Documentation generated on Mon, 13 Feb 2006 11:43:44 +0100 by phpDocumentor 1.3.0RC3