public function addCustom($usage, $template, array $options = [])
	{
		$config = $this->bbcodeMonkey->create($usage, $template);

		if (isset($options['tagName']))
		{
			$config['bbcode']->tagName = $options['tagName'];
		}

		if (isset($options['rules']))
		{
			$config['tag']->rules->merge($options['rules']);
		}

		return $this->addFromConfig($config);
	}
public function addCustom($usage, $template, array $options = [])
	{
		$config = $this->bbcodeMonkey->create($usage, $template);

		if (isset($options['tagName']))
		{
			$config['bbcode']->tagName = $options['tagName'];
		}

		if (isset($options['rules']))
		{
			$config['tag']->rules->merge($options['rules']);
		}

		return $this->addFromConfig($config);
	}
public function addCustom ( $ usage , $ template , array $ options = [ ] ) { $ config = $ this -> bbcodeMonkey -> create ( $ usage , $ template ) ; if ( isset ( $ options [ 'tagName' ] ) ) { $ config [ 'bbcode' ] -> tagName = $ options [ 'tagName' ] ; } if ( isset ( $ options [ 'rules' ] ) ) { $ config [ 'tag' ] -> rules -> merge ( $ options [ 'rules' ] ) ; } return $ this -> addFromConfig ( $ config ) ; }
Add a BBCode using their human-readable representation

@see s9e\TextFormatter\Plugins\BBCodes\Configurator\BBCodeMonkey

@param  string $usage    BBCode's usage
@param  string|\s9e\TextFormatter\Configurator\Items\Template $template BBCode's template
@param  array  $options  Supported: 'tagName' and 'rules'
@return BBCode           Newly-created BBCode
Add a BBCode using their human - readable representation