Common

# Class: LayerBase Source Location: /coreplugins/layers/common/Layers.php
### Class Overview
    CwSerializable
       |
       --LayerBase
Base class for layers | ### Variables $icon $id $label $link $maxScale $metadata $metaHash $minScale | ### Methods generateMetaHash getAllMetadata getMetadata unserialize
### Child classes: LayerContainer Layer with children LayerClass Layer class | ### Inherited Variables #### Class: CwSerializable CwSerializable::$className | ### Inherited Methods #### Class: CwSerializable CwSerializable::__construct() Constructor CwSerializable::copyAllVars() Copy all properties from one object to another (overwriting previous ones) CwSerializable::getValue() Returns structure's property value if property exists CwSerializable::guessClassName() Tries to guess the class to use from the property being unserialised. CwSerializable::unserialize() Unserializes from a stdClass structure CwSerializable::unserializeArray() Returns an array of typed values CwSerializable::unserializeObject() Returns an unserialized object from a stdClass structure CwSerializable::unserializeObjectMap() Returns an array of unserialized objects from a stdClass structure CwSerializable::unserializeStringArray() Returns an array of typed values from a string CwSerializable::unserializeValue() Returns a typed value from a structure property
### Class Details [line 33] Base class for layers [ Top ] ### Class Variables #### $icon = '' [line 61] Icon to display for layer #### Tags:
access: | public
Type: | string
[ Top ] #### $id = [line 38] #### Tags:
access: | public
Type: | string
[ Top ] #### $label = [line 43] #### Tags:
access: | public
Type: | string
[ Top ] #### $link = [line 67] External link to be added to label #### Tags:
access: | public
Type: | string
[ Top ] #### $maxScale = 0 [line 55] Maximum scale where layer is visible #### Tags:
access: | public
Type: | int
[ Top ] #### $metadata = array() [line 73] A map of metadata values, in the form "key=value" #### Tags:
access: | public
Type: | array
[ Top ] #### $metaHash = [line 80] A map for metadata, it is lazyly constructed from $metadata when requested. #### Tags:
access: | public
Type: | array
[ Top ] #### $minScale = 0 [line 49] Minimum scale where layer is visible #### Tags:
access: | public
Type: | int
[ Top ] ### Class Methods ### method generateMetaHash [line 85]
`void generateMetaHash( )`
Fills the $metaHash property from the metadata values in metadata field #### Tags:
access: | protected
[ Top ] ### method getAllMetadata [line 111]
`array getAllMetadata( )`
Returns an associative array of all metadata variables containted in this layer. #### Tags:
return: | an associative array of all metadata
access: | public
[ Top ] ### method getMetadata [line 98]
`string getMetadata( string $key)`
Returns a metadata valued from its key, or null if it does not exists. #### Tags:
return: | the value, or null if not there.
access: | public
#### Parameters:
string | $key | metadata key
[ Top ] ### method unserialize [line 120]
`void unserialize( mixed $struct)`
#### Tags:
access: | public
see: | CwSerializable::unserialize()
Overridden in child classes as: LayerContainer::unserialize() LayerGroup::unserialize() Layer::unserialize() Overrides CwSerializable::unserialize() (Unserializes from a stdClass structure) [ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:50 +0200 by phpDocumentor 1.3.0RC3