Show:

Constructs a ProAct.Registry.Provider. The ProAct.Registry uses registered providers as storage for different objects.

Every provider has one or more namespaces in the ProAct.Registry it is registered to.

Every provider knows how to store its type of obects, how to make them, or delete them.

Constructor

ProAct.Registry.Provider

() static

Item Index

Properties

Methods

delete

(
  • key
)
Object

Deletes a stored instance.

Parameters:

  • key String

    The key to delete.

Returns:

Object:

The stored object corresponding to the passed key or undefined if there is no such object.

get

(
  • key
)
Object

Reads a stored instance.

Parameters:

Returns:

Object:

The stored object corresponding to the passed key or undefined if there is no such object.

make

(
  • key
  • options
  • [...]
)
Object

Creates and stores an instance of the object this ProAct.Registry.Provider manages.

For the creation is used the provide method.

Parameters:

  • key String

    The key on which the new instance will be stored.

  • options Array

    Array containing options for the creation process. For example the exact sub-type of the object to create (optional).

  • [...] Object optional

    Parameters passed to the constructor when the new instance is created.

Returns:

Object:

The newly created and stored object.

provide

(
  • options
  • [...]
)
Object

Provides a new instance of the managed by this ProAct.Registry.Provider object.

Parameters:

  • options Array

    An array containing the key of the object to create and store. It may contain data to pass to the constructor of the object.

  • [...] Object optional

    Arguments that should be passed to the constructor.

Returns:

Object:

An isntance of the managed class of objects.

registered

(
  • registery
)
protected

A callback called by the ProAct.Registry when this ProAct.Registry.Provider is registered.

Parameters:

  • registery ProAct.Registry

    The registry in which this is being registered.

store

(
  • key
  • object
)
Object

Stores an instance of an object this ProAct.Registry.Provider manages.

Parameters:

  • key String

    The key on which the object will be stored.

  • object Object

    The object to store.

Returns:

Object:

The stored object.

Properties

constructor

ProAct.Registry.Provider final

Reference to the constructor of this object.