Packagewk.mvcs.service
Classpublic class WK_Services
InheritanceWK_Services Inheritance Object

Language Version : ActionScript 3.0

An arbitray class MyServices can be made a singleton by extending WK_Services, defining a static constant instance and passing the class MyServices to the constructor:

    import wk.mvc.controller.WK_Services;
    public class MyModels extends WK_Services
    {
      public static const instance: MyServices
        = WK_Services.instance(MyServices) as MyServices;
         public function MyServices() 
      {
        super(Object(this).constructor); // super(MyServices) does not work :-(
      }
      ...
    }
    



Public Methods
 MethodDefined By
  
WK_Services(p_class:Class)
WK_Services
  
instance(p_class:Class):WK_Services
[static]
WK_Services
Constructor Detail
WK_Services()Constructor
public function WK_Services(p_class:Class)



Parameters
p_class:Class
Method Detail
instance()method
public static function instance(p_class:Class):WK_Services

Parameters

p_class:Class

Returns
WK_Services — One and only one object of class p_class.