RE: [PHP] class instance name

2002-04-01 Thread Rick Emery

What is the class instance name?  Are you referring to the name of the
variable that holds the instance?

-Original Message-
From: Nate [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] class instance name


How do you determine the class instance name from within the class?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] class instance name

2002-04-01 Thread Erik Price


On Monday, April 1, 2002, at 06:24  PM, Nate wrote:

 How do you determine the class instance name from within the class?

Isn't it $this ?





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] class instance name

2002-04-01 Thread Martin Towell

or are you referring to this?

http://www.php.net/manual/en/function.get-class.php

(a function that I keep forgetting about)

Martin

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 9:53 AM
To: Nate
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] class instance name



On Monday, April 1, 2002, at 06:24  PM, Nate wrote:

 How do you determine the class instance name from within the class?

Isn't it $this ?





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] class instance name

2002-04-01 Thread Nate

No because it isn't the name of the class I want it is the name of the
instance of the class...



Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 or are you referring to this?

 http://www.php.net/manual/en/function.get-class.php

 (a function that I keep forgetting about)

 Martin

 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 9:53 AM
 To: Nate
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] class instance name



 On Monday, April 1, 2002, at 06:24  PM, Nate wrote:

  How do you determine the class instance name from within the class?

 Isn't it $this ?



 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] class instance name

2002-04-01 Thread Martin Towell

ahh! so the variable name then? don't think you can, unless it's passed to
the object manually

(please correct me if I'm wrong)

Martin


-Original Message-
From: Nate [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 10:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] class instance name


No because it isn't the name of the class I want it is the name of the
instance of the class...



Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 or are you referring to this?

 http://www.php.net/manual/en/function.get-class.php

 (a function that I keep forgetting about)

 Martin

 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 9:53 AM
 To: Nate
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] class instance name



 On Monday, April 1, 2002, at 06:24  PM, Nate wrote:

  How do you determine the class instance name from within the class?

 Isn't it $this ?



 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] class instance name

2002-04-01 Thread CC Zona

   or are you referring to this?
  
   http://www.php.net/manual/en/function.get-class.php

  (a function that I keep forgetting about)
  No because it isn't the name of the class I want it is the name of the
  instance of the class...

 ahh! so the variable name then? don't think you can, unless it's passed to
 the object manually

(Untried, but FWIW--) I suppose you could loop through all defined vars, 
testing whether they are objects, then asking each if the name of its class 
is the same as the name of the current class...but why would one need this 
info?

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php