SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    France
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Re-define a class

    Is it possible to redefine a class (in php5) or at least undefine a class then redefine it at a later time ?

    Something like "unset" but with classes.

    I need this to include a lot of single-class php files which class name doesn't matter at all. It would be easier if all the classes share the same name.

    Thanks.

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    No, it's not possible to unset a defined class.
    ERIK RIKLUND :: Yes, I've been gone quite a while.

  3. #3
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not in PHP. You might get some mileage from factories where you don't specifically define the name of a class, but to get whay ou really want, you would have tomoveto another which supports it. Ruby comes to mind, then you get to use Rails too, though you may not be able to use your current host

    Douglas
    Hello World

  4. #4
    SitePoint Member
    Join Date
    Apr 2004
    Location
    France
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, this was for some kind of plugin system. I'll find some workaround and go on with PHP.

    Thanks to both of you for the help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •