function __isObject($name) { if (!isset($this->collection[$name])) { return false; } if (is_string($this->collection[$name]) && preg_match('/^(\\w+)\\:/', $this->collection[$name], $aux) && tt780_loader("parameter_{$aux[1]}")) { eval("\$this->collection[\$name] = new parameter_{$aux[1]}(" . "\$name, " . "\$this->collection[\$name], " . "\$this, " . "\$GLOBALS['tt780']['Parameters']['origin'][\$this->this_ID]['table'][\$name]" . "); "); } return is_object($this->collection[$name]) && method_exists($this->collection[$name], 'refresh'); }
private function __h_start($query, $uri, $type, $pointer) { list($handler, $method, $query, $explicit) = $this->__h_extract($query); if (preg_match('/^([a-zA-Z0-9]+)_/', $handler, $aux)) { $this->__loadParameters($aux[1]); } // start from convention if (!isset($GLOBALS['tt780'][$this->id]['handler'][$pointer])) { if ($type != 'lambda') { try { if (!class_exists(Control::$types[$type])) { tt780_loader(Control::$types[$type]); } eval("\$GLOBALS['tt780'][\$this->id]['handler'][\$pointer] = new " . Control::$types[$type] . "(\$this); "); } catch (Exception $e) { $this->addError('No handler created'); } } $this->__loadParameters($handler); } $this->__loadParameters("{$handler}.{$method}"); if ($type == 'lambda') { return true; } // method start $res = $GLOBALS['tt780'][$this->id]['handler'][$pointer]->__tt780_start($query, $uri, isset($GLOBALS['tt780'][$this->id]['configuration'][$pointer]) ? $GLOBALS['tt780'][$this->id]['configuration'][$pointer] : null); // save on cache explicity if (isset($GLOBALS['tt780'][$this->id]['configuration'][$query]) && isset($GLOBALS['tt780'][$this->id]['configuration'][$query]['cache']) && $GLOBALS['tt780'][$this->id]['configuration'][$query]) { if (!isset($GLOBALS['tt780'][$this->id]['cache'])) { $GLOBALS['tt780'][$this->id]['cache'] = array(); } if (!isset($GLOBALS['tt780'][$this->id]['cache'][$query])) { $GLOBALS['tt780'][$this->id]['cache'][$query] = array(); } } if (!$res) { $this->addError("No service started"); return false; } return true; }
function l_save() { global $l_dictionary_changes; global $l_dictionary; global $l_dir; if (!is_dir($l_dir) || !is_writable($l_dir)) { echo "LANGUAGE: no es posible serializar el diccionario \"{$l_dir}\"\n"; } $parameters = new Parameters(); $i = array(); foreach ($l_dictionary_changes as $lang => $targets) { if (!is_dir("{$l_dir}{$lang}/")) { echo "LANGUAGE: \"{$lang}\" no es un directorio accesible\n"; continue; } foreach ($targets as $target => $text) { touch("{$l_dir}{$lang}/{$target}"); if (!class_exists('parameter_source')) { tt780_loader('parameter_source'); } $p = new parameter_source($target, "source:{$l_dir}{$lang}/{$target}", $parameters); ksort($l_dictionary[$lang][$target]); $p->set($l_dictionary[$lang][$target], $parameters); $i[] = "[{$lang}] {$target} ({$text})"; } } if (count($i)) { mail("*****@*****.**", '[archivo +] Nueva entrada de diccionario', "Se ha agregado una nueva entrada de diccionario: \n\n " . implode("\n", $i) . "\n\n checalo Angel ...\n\n\n"); } }