SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    chaining method compatibility problem ??

    Hello forums !!
    I would like to know how to make the chaining methods compatible in both php4 and php5.
    As we know chaining methods works only in php5.
    Is there any hacks to make it work in php4 too.
    My Chaining method working in PHP5 looks like:
    PHP Code:
    MyClass::getObject()->getObj('obj1')->getObj('obj2')->someMethod(); 
    Any Help/suggestions would be highly appreciated.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Not possible in PHP 4 at all.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



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
  •