/** * Load the censored words from the text file. * * @access public * @return array * @static */ public static function censored() { if (empty(self::$__censored)) { $path = DECODA_CONFIG . 'censored.txt'; if (file_exists($path)) { self::$__censored = file($path); } } return self::$__censored; }
/** * Loads the string into the system, if no custom code it doesnt parse. * * @access public * @param string $string * @param array $allowed * @return void */ public function __construct($string, $allowed = array()) { if (strpos($string, '[') === false && strpos($string, ']') === false) { $this->__config['parse'] = false; } else { if (!empty($allowed) && is_array($allowed)) { $this->__allowed = array_unique($allowed); } } // Include geshi if (file_exists(DECODA_GESHI . 'geshi.php')) { require_once DECODA_GESHI . 'geshi.php'; } else { $this->__config['geshi'] = false; } // Load emoticons and censored $this->__emoticons = DecodaConfig::emoticons(); $this->__censored = DecodaConfig::censored(); $this->__textToParse = $string; return false; }