Re: [php-49] class path

From: Darcy W. C.
Sent on: Saturday, January 31, 2009 12:06 PM
hi andrew,

  no, i am not interested in statically calling these classes.  jason k's response was what i was looking for.



On Jan 30, 2009, at 11:50 PM, Andrew Urban wrote:

Are you referring to late static binding?

On Fri, Jan 30, 2009 at 11:35 PM, darcy w. christ <[address removed]> wrote:
hi everyone,

 it's late, i'm tired and stumped.


 does anyone know how to get the path to a class from a method in the parent/super class?

 in the example below, i would like to not have to create the method, showPath() for each Child class.  but i'm stumped how to get a hold of the child's path from within a method defined in the parent class.  is this possible?  am i missing something (quite likely given my state of mind these days)???


 class ChildClass extends () {
               function showPath() {
                       echo dirname(__FILE__); // shows path to ChildClass
               }
 }


 class ParentClass() {
               function showPath() {
                       echo dirname(__FILE__); // shows path to ParentClass
               }
 }


~/darcy w. christ
1000camels





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://php.meetup.com/49/
This message was sent by darcy w. christ ([address removed]) from The Seattle PHP Meetup Group.
To learn more about darcy w. christ, visit his/her member profile: http://php.meetup.com/49/members/3366628/
To unsubscribe or to update your mailing list settings, click here: http://www.meetup.com/account/comm/
Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA




--
Stephen Hawking: "My goal is simple. It is a complete understanding of the universe, why it is as it is and why it exists at all."




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Andrew Urban ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Andrew Urban, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA


~/darcy w. christ
1000camels


Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy