protected function addFromConfig(array $config)
	{
		$bbcodeName = $config['bbcodeName'];
		$bbcode     = $config['bbcode'];
		$tag        = $config['tag'];

		// If the BBCode doesn't specify a tag name, it's the same as the BBCode
		if (!isset($bbcode->tagName))
		{
			$bbcode->tagName = $bbcodeName;
		}

		// Normalize this tag's templates
		$this->configurator->templateNormalizer->normalizeTag($tag);

		// Test whether this BBCode/tag is safe before adding it
		$this->configurator->templateChecker->checkTag($tag);

		// Add our BBCode then its tag
		$this->collection->add($bbcodeName, $bbcode);
		$this->configurator->tags->add($bbcode->tagName, $tag);

		return $bbcode;
	}
protected function addFromConfig(array $config)
	{
		$bbcodeName = $config['bbcodeName'];
		$bbcode     = $config['bbcode'];
		$tag        = $config['tag'];

		// If the BBCode doesn't specify a tag name, it's the same as the BBCode
		if (!isset($bbcode->tagName))
		{
			$bbcode->tagName = $bbcodeName;
		}

		// Normalize this tag's templates
		$this->configurator->templateNormalizer->normalizeTag($tag);

		// Test whether this BBCode/tag is safe before adding it
		$this->configurator->templateChecker->checkTag($tag);

		// Add our BBCode then its tag
		$this->collection->add($bbcodeName, $bbcode);
		$this->configurator->tags->add($bbcode->tagName, $tag);

		return $bbcode;
	}
protected function addFromConfig ( array $ config ) { $ bbcodeName = $ config [ 'bbcodeName' ] ; $ bbcode = $ config [ 'bbcode' ] ; $ tag = $ config [ 'tag' ] ; // If the BBCode doesn't specify a tag name, it's the same as the BBCode if ( ! isset ( $ bbcode -> tagName ) ) { $ bbcode -> tagName = $ bbcodeName ; } // Normalize this tag's templates $ this -> configurator -> templateNormalizer -> normalizeTag ( $ tag ) ; // Test whether this BBCode/tag is safe before adding it $ this -> configurator -> templateChecker -> checkTag ( $ tag ) ; // Add our BBCode then its tag $ this -> collection -> add ( $ bbcodeName , $ bbcode ) ; $ this -> configurator -> tags -> add ( $ bbcode -> tagName , $ tag ) ; return $ bbcode ; }
Add a BBCode and its tag based on the return config from BBCodeMonkey

@param  array  $config BBCodeMonkey::create()'s return array
@return BBCode
Add a BBCode and its tag based on the return config from BBCodeMonkey