Beispiel #1
0
 protected static function TraceTabulation()
 {
     $tab = self::getTime(DateTime::now()) . " Trace : ";
     $txt = "";
     for ($i = 0; $i < Strings::lenght($tab); $i++) {
         $txt .= " ";
     }
     return $txt . " ";
 }
Beispiel #2
0
 /**
  * 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;
 }
Beispiel #3
0
 /**
  * set the args and options
  */
 protected function setParams()
 {
     $this->params();
     //
     foreach ($this->params as $key => $value) {
         $cont = $this->strip($value);
         //
         if (Strings::lenght($cont) > 2) {
             if ($cont[0] == "-" && $cont[1] == "-") {
                 $this->setOption($cont);
             } elseif ($cont[0] != "-" && $cont[1] != "-") {
                 $this->setArgument($cont);
             }
         } else {
             $this->setArgument($cont);
         }
     }
 }