/** * @return LBoxSlotManager * @throws Exception */ public static function getInstance() { $className = __CLASS__; try { if (!self::$instance instanceof $className) { self::$instance = new $className(); } return self::$instance; } catch (Exception $e) { throw $e; } }
/** * Vrati obsah slotu podle daneho nazvu * @param string $name * @param bool $silent * @return string * @throws LBoxExceptionFront */ public function templateGetSlot($name = "", $silent = false) { try { return LBoxSlotManager::getInstance()->getSlot($name, $silent); } catch (Exception $e) { if ($silent && $e->getCode() == LBoxExceptionFront::CODE_SLOT_NOT_DEFINED) { return ""; } else { throw $e; } } }