[TYPO3-dev] tslib_pibase can't fetch translations, pi_getLL()

Cyrill Helg phlogsmailinglists at gmail.com
Fri May 2 22:39:25 CEST 2008


Am Freitag, 2. Mai 2008 schrieb Cyrill Helg:
> Am Freitag, 2. Mai 2008 schrieb Dmitry Dulepov [typo3]:
> > You do not to things like this in TYPO3. Correct code would be:
> >
> > $className = t3lib_div::makeInstanceClassName(tx_myext_controller);
> > $controller = new $className($this);
> >
> > Never ever use "new" with TYPO3 in your code.
> >
> > In class.tx_myext_controller.php:
> >
> > class tx_myext_controller {
> >
> >         var $pObj;
> >
> >         function __construct(&$pObj) {
> >                 $this->pObj = $pObj;
> >         }
> >
> >         function foo() {
> >                 $str = $this->pObj->pi_getLL('idstr');
> >         }
> > }
>
> This does not work here:
>
> Call to a member function getLL() on a non-object in...

>
> So its not possible to use methods from the class that did the instance?

Forget it please, it was just a simple typo.

Sorry.

>
> Thanks
> Cyrill
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev






More information about the TYPO3-dev mailing list