A class to register codecs for objects.
| mxCodecRegistry | A class to register codecs for objects. |
| Variables | |
| codecs | Maps from constructor names to codecs. |
| aliases | Maps from classnames to codecnames. |
| Functions | |
| register | Registers a new codec and associates the name of the template constructor in the codec with the codec object. |
| addAlias | Adds an alias for mapping a classname to a codecname. |
| getCodec | Returns a codec that handles objects that are constructed using the given ctor. |
| getInstanceForName | Creates and returns a new instance for the given class name. |
| getName | Returns the codec name for the given object instance. |
static function register( $codec )
Registers a new codec and associates the name of the template constructor in the codec with the codec object. Automatically creates an alias if the codename and the classname are not equal.
| codec | mxObjectCodec to be registered. |
Maps from constructor names to codecs.
public static $codecs
Maps from classnames to codecnames.
public static $aliases
Registers a new codec and associates the name of the template constructor in the codec with the codec object.
static function register( $codec )
Adds an alias for mapping a classname to a codecname.
static function addAlias( $classname, $codecname )
Returns a codec that handles objects that are constructed using the given ctor.
static function getCodec( $name )
Creates and returns a new instance for the given class name.
static function getInstanceForName( $name )
Returns the codec name for the given object instance.
static function getName( $obj )