/** * @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; }
/** @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; }