Exemple #1
0
 /**
  * @param string $api_classes   Name of the class or classes to be published to the Ext.Direct API
  * @param boolean $autorun   If true, automatically run the controller
  */
 public function __construct($api_classes = null, $autorun = true)
 {
     if (is_array($api_classes)) {
         ExtDirect::$api_classes = $api_classes;
     } elseif (is_string($api_classes)) {
         ExtDirect::$api_classes = array($api_classes);
     }
     $this->request = new ExtDirectRequest();
     $this->response = new ExtDirectResponse();
     if ($autorun) {
         $this->run();
         $this->output();
         exit;
     }
 }