Re: How can I do this -- method chaining

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Nobbe wrote:
On Jan 30, 2008 11:58 AM, Stut <stuttle@xxxxxxxxx <mailto:stuttle@xxxxxxxxx>> wrote:

    Ok, I'm going to have to assume you really are as stupid as you seem. If
    I need to provide an example to demonstrate what I meant I will, but I
    feel I made it quite clear that my comment regarding what *I* would do
    did not in any way relate to the code example I had provided above. The
    example I provided was fulfilling the OP's requirements.

    This is what *I* would do...

    <?php
    class Test {
        public static function doSomething() {
            // I'm assuming this method is fairly complex, and involves
            // more than just this method, otherwise there is no point
            // in creating an instance of the class, just use a static
            // method.

            // ^^^^ See this comment here, this was taken from the
            // non-static method in the example I posted. This is what
            // I meant when I say "just use a static method".
        }
    }
    Test::doSomething();
    ?>

    Look ma, no instance.


well, at least its clear now, what you meant.
    FYI I'm not at all new to OOP, in general or in PHP, so I am well aware
    that the example I originally posted created an instance of the class.


glad to hear it; no hard feelings i hope..

Indeed. Now, the place where you sleep... is it guarded?

;)

-Stut

--
http://stut.net/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux