Esempio n. 1
0
 function findInstalledCliApps()
 {
     $discovered = new Util\ArrayObject();
     $apps = Project::getCurrent()->getApplications();
     foreach ($apps as $A) {
         foreach ($A->getCliModules() as $mod) {
             // TODO: Error if there is already a mod under this name
             $section = $discovered->setDefault($A->getName(), new Util\ArrayObject());
             $section[$A->getLabel() . ':' . $mod->getName()] = $mod;
         }
     }
     return $discovered;
 }
Esempio n. 2
0
 function __construct($filename = false)
 {
     parent::__construct();
     if ($filename) {
         $this->loadFile($filename);
     }
 }
Esempio n. 3
0
 function offsetUnset($offset)
 {
     if ($this->frozen) {
         throw new \Exception('QueryDict is frozen');
     }
     return parent::offsetUnset($offset);
 }
Esempio n. 4
0
 function __toString()
 {
     $a = new Util\ArrayObject($this->getPk());
     return sprintf('<%s %s>', get_class($this), $a->join('=', ', '));
 }
Esempio n. 5
0
 function __construct()
 {
     parent::__construct($_SERVER);
 }