public function addFromRepository($name, $repository = 'default', array $vars = [])
	{
		// Load the Repository if necessary
		if (!($repository instanceof Repository))
		{
			if (!$this->repositories->exists($repository))
			{
				throw new InvalidArgumentException("Repository '" . $repository . "' does not exist");
			}

			$repository = $this->repositories->get($repository);
		}

		return $this->addFromConfig($repository->get($name, $vars));
	}
public function addFromRepository($name, $repository = 'default', array $vars = [])
	{
		// Load the Repository if necessary
		if (!($repository instanceof Repository))
		{
			if (!$this->repositories->exists($repository))
			{
				throw new InvalidArgumentException("Repository '" . $repository . "' does not exist");
			}

			$repository = $this->repositories->get($repository);
		}

		return $this->addFromConfig($repository->get($name, $vars));
	}
public function addFromRepository ( $ name , $ repository = 'default' , array $ vars = [ ] ) { // Load the Repository if necessary if ( ! ( $ repository instanceof Repository ) ) { if ( ! $ this -> repositories -> exists ( $ repository ) ) { throw new InvalidArgumentException ( "Repository '" . $ repository . "' does not exist" ) ; } $ repository = $ this -> repositories -> get ( $ repository ) ; } return $ this -> addFromConfig ( $ repository -> get ( $ name , $ vars ) ) ; }
Add a BBCode from a repository

@param  string $name       Name of the entry in the repository
@param  mixed  $repository Name of the repository to use as source, or instance of Repository
@param  array  $vars       Variables that will replace default values in the tag definition
@return BBCode             Newly-created BBCode
Add a BBCode from a repository