Esempio n. 1
0
 /**
  * @param Core\Init $O init instance
  * @return static
  * */
 public static function getInstance(\Fp\Core\Init $O)
 {
     $classname = get_called_class();
     if (!($c = $O->getInstance($classname))) {
         $c = new $classname($O);
         $O->setInstance($classname, $c);
     }
     return $c;
 }
Esempio n. 2
0
 /** @return $this Description * */
 public static function getInstance(\Fp\Core\Init $O, $defaultMode = 'html', $defaultUrl = null)
 {
     $classname = get_called_class();
     if (!($c = $O->getInstance($classname))) {
         $c = new $classname($O, $defaultMode, $defaultUrl);
         $O->setInstance($classname, $c);
     }
     return $c;
 }