/** * get the instance, or null if no debug! * @return DebugBar */ static function getInstance() { $ip = getenv("REMOTE_ADDR"); //TraceDebugFactory::addDump($ip,'ip'); // on n'authorize le debug que sur certaine IP, dans tous les cas ! /*if ( (strpos($ip, '192.168.0') === 0 || $ip=='127.0.0.1' )){*/ if (!DEBUG_ON) { return; } return \org\equinox\ioc\ContainerFactory::getBean('debugBar'); }
public function storeForm($form) { $manager = \org\equinox\ioc\ContainerFactory::getBean('formManager'); $manager->storeForm($form); }
/** * Smarty {form} function plugin * * Type: function<br> * Name: form<br> * Purpose: genere a form * @param Smarty * @return string|null */ function formFunction($params, $smarty) { $definition = $params['definition']; if ($definition == '') { throw new \Exception("<b>Form: Attribut 'definition' obligatoire pour le plugin {form}</b>"); } $generator = \org\equinox\ioc\ContainerFactory::getBean('formGenerator'); return $generator->getHtml($definition); }