[TYPO3-dev] tslib_pibase can't fetch translations, pi_getLL()
Cyrill Helg
phlogsmailinglists at gmail.com
Fri May 2 22:35:28 CEST 2008
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?
Thanks
Cyrill
More information about the TYPO3-dev
mailing list