[TYPO3-dev] How to access variables in PHP 5

Tapio Markula tapio.markula at xetpoint.fi
Wed Dec 16 16:35:10 CET 2009


Francois Suter kirjoitti:
> Hi Tapio,
> 
>> How I can refer to [uid] => 6. I'm not familiar with
>> 'currentRow:protected' etc. PHP 5 code.
> 
> You can't access protected member variables from outside an object.


the variable has been defined in
prinfo_smallads/models/class.tx_prinfosmallads_basemodel.php


class tx_prinfosmallads_basemodel {

	/**
	 * Current data row
	 *
	 * @var	array
	 */
	protected	$currentRow = array(); The

> object should have getter and setter methods for this. 

the basemodel doesn't have getter or setter methods for this - so what to do

So look up the
> definition of the tx_prinfosmallads_entry class and see if there's a 
> method like getCurrentRow or some such.

no - there is not

> 
> You want to look at: 
> http://www.php.net/manual/en/language.oop5.visibility.php
> 
> HTH
> 

this is completely new for me - I didn't have problems with PHP 4.




More information about the TYPO3-dev mailing list