Common

# Class: CwSerializable Source Location: /common/CwSerializable.php
### Class Overview
Abstract class for all classes that can be serialized #### Author(s): | ### Variables $className | ### Methods __construct copyAllVars getValue guessClassName unserialize unserializeArray unserializeObject unserializeObjectMap unserializeStringArray unserializeValue
### Child classes: Dimension Represents an image's dimension GeoDimension Represents an image's dimension and bbox Shape Abstract class for shapes Message A class for messages Location Position on a map LayerState Layer display state InitialMapState Initial display state for a mapfile MapInfo Main MapInfo class MapRequest Request sent from client to server MapResult Result sent from server to client 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 GeostatRequest GeostatChoropleth Geostat Choropleth Parameters Class GeostatResult GeostatInit GeostatLayerParams TwColorRgb TwClassification TwBin TwDistributionSummary SearchParameter Abstract class for all classes that can be serialized SearchRequest Request SearchResult Result ExportPdfInit ExportPdf initialization information OgcLayerLoaderRequest OgcLayerLoaderRequest EditRequest Request EditResult Result PositionOverlay PositionOverlay BasicOverlay BasicOverlay LayerReorderInit LayerReorderRequest LayerTransparency LayerReorderResult Parameter A parameter RoutingRequest Request Attribute An attribute Step Step for roadmap RoutingResult Result QueryRequest QueryResult LayerBase Base class for layers ChildrenSwitch Class containing children for children switching LayersRequest A request for layers. LayersResult Result of a layers request. User added layers. UserLayer User Layer 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 TableFlags Flags used in requests for querying tables TableRow A table row Table A table TableGroup A group of tables Image An Image Images Images object common to requests and results, which contains all cartoweb images used during a map display. SerializableTestClass1 Test class used to test abstract class CwSerializable (all types of attribute) SerializableTestClass2 Test class used to test abstract class CwSerializable (simple) ProjectpluginRequest ProjectpluginResult ProjectpluginInit ProjectTableRequest ProjectTableResult ProjectLocationRequest ProjectLocationResult
### 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 SearchRequest::__construct() 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() Circle::unserialize() Message::unserialize() Sets object properties from $struct data. Location::unserialize() LayerState::unserialize() InitialMapState::unserialize() MapInfo::unserialize() MapRequest::unserialize() Sets object properties from $struct data. MapResult::unserialize() Sets object properties from $struct data. StyledShape::unserialize() OutlineRequest::unserialize() OutlineResult::unserialize() OutlineInit::unserialize() OutlineDefaultValue::unserialize() GeostatRequest::unserialize() GeostatChoropleth::unserialize() GeostatResult::unserialize() GeostatInit::unserialize() GeostatLayerParams::unserialize() TwColorRgb::unserialize() TwClassification::unserialize() TwBin::unserialize() TwDistributionSummary::unserialize() SearchParameter::unserialize() SearchRequest::unserialize() SearchResult::unserialize() ExportPdfInit::unserialize() OgcLayerLoaderRequest::unserialize() EditRequest::unserialize() EditResult::unserialize() PositionOverlay::unserialize() BasicOverlay::unserialize() ColorOverlay::unserialize() StyleOverlay::unserialize() LabelOverlay::unserialize() ClassOverlay::unserialize() MetadataOverlay::unserialize() LayerOverlay::unserialize() MapOverlay::unserialize() LayerReorderInit::unserialize() LayerReorderRequest::unserialize() LayerTransparency::unserialize() LayerReorderResult::unserialize() Parameter::unserialize() RoutingRequest::unserialize() Attribute::unserialize() Step::unserialize() RoutingResult::unserialize() QueryRequest::unserialize() QueryResult::unserialize() LayerBase::unserialize() LayerContainer::unserialize() LayerGroup::unserialize() Layer::unserialize() ChildrenSwitch::unserialize() LayersRequest::unserialize() LayersResult::unserialize() UserLayer::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() TableFlags::unserialize() TableRow::unserialize() Table::unserialize() TableGroup::unserialize() Image::unserialize() Images::unserialize() SerializableTestClass1::unserialize() SerializableTestClass2::unserialize() ProjectpluginRequest::unserialize() ProjectpluginResult::unserialize() ProjectpluginInit::unserialize() ProjectTableRequest::unserialize() ProjectTableResult::unserialize() ProjectLocationRequest::unserialize() ProjectLocationResult::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 CwSerializable, 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 Fri, 21 Sep 2007 13:30:45 +0200 by phpDocumentor 1.3.0RC3