On Mon, Aug 25, 2008 at 11:01 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>>> Curious. Which do you prefer and why?
>
> Accessor methods. They allow for changes in the future that may well
> be unforeseen at the moment. Or at least that would be my response
> with PHP4. Now with the __get and __se
>> Curious. Which do you prefer and why?
Accessor methods. They allow for changes in the future that may well
be unforeseen at the moment. Or at least that would be my response
with PHP4. Now with the __get and __set built-in accessors, that's
pretty much taken care of.
> I access directly to avo
On Mon, Aug 25, 2008 at 8:32 AM, Philip Thompson <[EMAIL PROTECTED]> wrote:
> Hi all.
>
> Curious. Which do you prefer and why?
>
> class Hello {
>public $hi;
>
>function __construct () {
>$this->hi = 'Well Hello There!';
>}
>
>function hi () {
>return $this->hi;
>
On 25 Aug 2008, at 13:54, Christoph Boget wrote:
]Curious. Which do you prefer and why?
For publicly-declared variables, do you access the attribute
directly or
use an accessor?
If it's a public member variable there is no need for plain
accessor methods
- they add no value. I feel the same
On Aug 25, 2008, at 7:54 AM, Christoph Boget wrote:
Curious. Which do you prefer and why?
For publicly-declared variables, do you access the attribute
directly or
use an accessor?
If it's a public member variable there is no need for plain
accessor methods
- they add no value. I feel the sa
>> Curious. Which do you prefer and why?
>> For publicly-declared variables, do you access the attribute directly or
>> use an accessor?
> If it's a public member variable there is no need for plain accessor methods
> - they add no value. I feel the same about private variables with plain get
> and
On 25 Aug 2008, at 13:32, Philip Thompson wrote:
Curious. Which do you prefer and why?
hi = 'Well Hello There!';
}
function hi () {
return $this->hi;
}
}
$hello = new Hello ();
// Access the value this way...
echo $hello->hi;
// or the accessor...
echo $hello->hi();
?>
For p
Hi all.
Curious. Which do you prefer and why?
hi = 'Well Hello There!';
}
function hi () {
return $this->hi;
}
}
$hello = new Hello ();
// Access the value this way...
echo $hello->hi;
// or the accessor...
echo $hello->hi();
?>
For publicly-declared variables, do you ac
8 matches
Mail list logo