In Decoda::__construct(), the default config path is always added:
$this->addPath(dirname(__DIR__) . '/config/');
So if I want to override the default emoticons or censored words, I have to call
$code->reset($text, true);
After instantiating Decoda, and then I can add my own paths. It would have been nicer if $this->addPath(dirname(__DIR__) . '/config/'); was part of Decoda::defaults(), but I guess that's a backwards incompatible change? Maybe we can add a third parameter to the constructor.
In
Decoda::__construct()
, the default config path is always added:So if I want to override the default emoticons or censored words, I have to call
After instantiating
Decoda
, and then I can add my own paths. It would have been nicer if$this->addPath(dirname(__DIR__) . '/config/');
was part ofDecoda::defaults()
, but I guess that's a backwards incompatible change? Maybe we can add a third parameter to the constructor.