/** * This function is used to parse a shortcode into options that TubePress can use. * * @param string $content The haystack in which to search * * @return array The associative array of parsed options. */ public function parse($content) { $this->_shouldLog = $this->_logger->isHandling(ehough_epilog_Logger::DEBUG); try { $this->_wrappedParse($content); } catch (Exception $e) { if ($this->_shouldLog) { $this->_logger->error('Caught exception when parsing shortcode: ' . $e->getMessage()); } } }
/** * Performs TubePress-wide initialization. * * @return boolean True if boot completed normally, false otherwise. */ public final function boot() { /** * Don't boot twice! */ if (self::$_alreadyBooted) { return true; } /** * Setup initial class loader. */ $this->_01_buildInitialClassLoader(); /* * Setup basic logging facilities. */ $this->_02_configureLogging(); /** * Record start time. */ $this->_03_recordStartTime(); try { $this->_04_buildInitialIocContainer(); $this->_05_primeClassMap(); $this->_06_configureLoggingForWordPress(); $this->_07_discoverAddons(); $this->_08_registerAddonClassHints(); $this->_09_compileIocContainer(); $this->_10_bootAddons(); $this->_11_dispatchBootCompleteEvent(); $this->_12_flushLogIfNeeded(); } catch (Exception $e) { if ($this->_shouldLog) { $this->_logger->error('Caught exception while booting: ' . $e->getMessage()); //flush out log statements $this->_loggingHandler->setStatus(true); } return false; } /** * Remember that we booted. */ self::$_alreadyBooted = true; /** * Record finish time. */ $this->_13_recordFinishTime(); /** * Free up some memory. */ $this->_14_freeMemory(); return true; }