I did this because personally I don't like static functions spread all over the place. Also I'm almost positive it is an anti-pattern. 

This way if Joomla decides to scrap JText now or in the future there is only one function that has to change. 

You'll probably notice with the exception of JFactory, I've wrapped all statics in class methods. And to be honest I regret not wrapping it too. 

Sincerely,
Mathew Lenning

Babel-university.com

P.S. This message was sent via iPhone, so please forgive any errors

> On Apr 26, 2014, at 12:44 AM, Thomas Hunziker <notifications@github.com> wrote:
> 
> In libraries/cms/controller/base.php:
> 
> > +	 * @return void
> > +	 */
> > +	protected function refreshToken()
> > +	{
> > +		$session = JFactory::getSession();
> > +		$session->getToken(true);
> > +	}
> > +	
> > +	/**
> > +	 * Method to translate a string using JText::_() method
> > +	 * @param string $string
> > +	 * @return string translation result
> > +	 */
> > +	protected function translate($string)
> > +	{
> > +		return JText::_($string);
> I agree that it doesn't make much sense to add a wrapper around JText.
> 
> \
> Reply to this email directly or view it on GitHub.