On 6/2/05, GamblerZG <[EMAIL PROTECTED]> wrote:
> Maybe it's just me, but the core concept of __autoload() seems to be
> broken to me. Moreover, every proposed solution I've heard about is
> totally inside the box. I would do it like this:
> 1) Define $_AUTOLOAD superglobal.
When forced to do OO,
Maybe it's just me, but the core concept of __autoload() seems to be
broken to me. Moreover, every proposed solution I've heard about is
totally inside the box. I would do it like this:
1) Define $_AUTOLOAD superglobal.
2) If I need SomeClass to be autoloaded I write this:
$_AUTOLOAD['SomeClass'
Jason Barnett wrote:
Jochem Maas wrote:
Richard Lynch wrote:
On Wed, June 1, 2005 3:53 am, Marcus Bointon said:
On 1 Jun 2005, at 11:38, Jochem Maas wrote:
...
I opened up a feature request for this very topic a while back. The
__autoload function should just register user-defined
Jochem Maas wrote:
Richard Lynch wrote:
On Wed, June 1, 2005 3:53 am, Marcus Bointon said:
On 1 Jun 2005, at 11:38, Jochem Maas wrote:
all true, now imagine that you install a couple of 3rdparty php5
'packages'
and they all define __autoload() - ain't gonna work! which is why
there has bee
Richard Lynch wrote:
On Wed, June 1, 2005 3:53 am, Marcus Bointon said:
On 1 Jun 2005, at 11:38, Jochem Maas wrote:
all true, now imagine that you install a couple of 3rdparty php5
'packages'
and they all define __autoload() - ain't gonna work! which is why
there has been
discussion on inter
On 2 Jun 2005, at 11:56, Colin Ross wrote:
The way I see it, you are gonna be spending quite a bit of time
writing all those lines of code for the class, what is bad about
another requiring the file each time?
Huh? Writing a 1-line function in a base class means that I would
never have to
On 2 Jun 2005, at 03:00, Richard Lynch wrote:
Maybe I'm being dumb, but how can an object's __autoload function get
called when the object class definition hasn't been loaded, and
that's why
you're calling __autoload in the first place...
It wouldn't solve everything, but it would help. It
On Wed, June 1, 2005 3:53 am, Marcus Bointon said:
> On 1 Jun 2005, at 11:38, Jochem Maas wrote:
>
>> all true, now imagine that you install a couple of 3rdparty php5
>> 'packages'
>> and they all define __autoload() - ain't gonna work! which is why
>> there has been
>> discussion on internals rega
* janbro <[EMAIL PROTECTED]> :
> Okay, I see there is a workaround but nothing realy satisfying, but I'm
> not hoing to complain, I'm hapy to have oo in PHP at all. I never worked
> with __autoload so far, but I will give it a try and check it out
The best way to use autoload is with the auto_prep
Alright thanks, I see there is a workaround to cope with that. I've
never worked with __autoload, but will sure give it a look. I don't
realy feel this satisfying, but hey I'm thankful to have oo at all.
janbro
Marcus Bointon schrieb:
> On 1 Jun 2005, at 09:01, janbro wrote:
>
>> require (Class2
Okay, I see there is a workaround but nothing realy satisfying, but I'm
not hoing to complain, I'm hapy to have oo in PHP at all. I never worked
with __autoload so far, but I will give it a try and check it out
thx
janbro
Marcus Bointon schrieb:
> On 1 Jun 2005, at 09:01, janbro wrote:
>
>> requi
On 1 Jun 2005, at 11:38, Jochem Maas wrote:
all true, now imagine that you install a couple of 3rdparty php5
'packages'
and they all define __autoload() - ain't gonna work! which is why
there has been
discussion on internals regarding the possibility of use a handler-
function stack
for auto
eoghan wrote:
maybe have a look at extends
class Class1 extends Class2 {...
he will still have to make sure that Class2
is loaded. besides wrapping 1 object inside another is perfectly
acceptable, if my GOF terminology serves me well then this
is usually termed a Delegation pattern (not th
Marcus Bointon wrote:
On 1 Jun 2005, at 09:01, janbro wrote:
require (Class2.php);
I bet you didn't cut'n'paste that from a working file :-)
class Class1{
private function ... {
$refClass2 = new Class2;
}
}
Now my question, is it possible to skip that require/ include part?
maybe have a look at extends
class Class1 extends Class2 {...
janbro wrote:
Hi List,
I'm using the oo orientation of PHP5 for a while now. All Classes I've
got have a require on top them, if I try to reference to other classes.
something like
require (Class2.php);
class Class1{
pr
Hello janbro,
Wednesday, June 1, 2005, 9:01:57 AM, you wrote:
j> Now my question, is it possible to skip that require/ include part?
j> In Java you don't need that, as class and file names are identical.
Personally I'd __autoload them, but this might not be ideal for your
file structure. Worth a
On 1 Jun 2005, at 09:01, janbro wrote:
require (Class2.php);
class Class1{
private function ... {
$refClass2 = new Class2;
}
}
Now my question, is it possible to skip that require/ include part? In
Java you don't need that, as class and file names are identical.
PHP doesn't ha
Hi List,
I'm using the oo orientation of PHP5 for a while now. All Classes I've
got have a require on top them, if I try to reference to other classes.
something like
require (Class2.php);
class Class1{
private function ... {
$refClass2 = new Class2;
}
}
Now my qu
18 matches
Mail list logo