protected static function TraceTabulation() { $tab = self::getTime(DateTime::now()) . " Trace : "; $txt = ""; for ($i = 0; $i < Strings::lenght($tab); $i++) { $txt .= " "; } return $txt . " "; }
/** * Get the dynamic paramteres from route string */ protected static function dynamic($route) { $parms = array(); $param = ""; $open = false; // for ($i = 0; $i < Strings::lenght($route); $i++) { if ($open && $route[$i] != "}") { $param .= $route[$i]; } // if ($route[$i] == "{" && !$open) { $open = true; } elseif ($route[$i] == "}" && $open) { $open = !true; $parms[] = $param; $param = ""; } } // return $parms; }
/** * Set classes aliases */ public static function setAlias($alias) { $shortcuts = $alias["shortcuts"]; foreach ($shortcuts as $alias => $target) { $target = Strings::replace($target, "/", "\\"); Alias::set($target, $alias); } }
/** * get the id key of the model from his name * * @param $table : string name of the model */ protected function idKey($table) { return Strings::toLower($table) . "_id"; }
/** * splite commande string with '@' */ protected static function spliteStringCallback($string) { $data = Strings::splite($string, "@"); return array('controller' => $data[0], 'methode' => $data[1]); }
/** * Set classes aliases */ public static function setAlias($alias) { if (self::isConfigKeyExist($alias, "shortcuts")) { $shortcuts = self::$config[$alias]["shortcuts"]; // foreach ($shortcuts as $alias => $target) { $target = Strings::replace($target, "/", "\\"); Alias::set($target, $alias); } } }
/** * get the name of option */ protected function getOptionalKeyValue($opt) { $data = Strings::splite($opt, "="); return $data[0]; }