Sure! Just pass an instance of the helper back from its default method. E.g:-

class MyHelper_Calculator
{
    public function calculator()
    {
        return $this;
    }

    public function add($a, $b)
    {
        return $a + $b;
    }

...etc...
}

...and in your script you'd simply call it like so:-

<?php $this->Calculator()->add(3, 4) ?>

But I want to group several functions into one single helper. For example,
to have a "Calculation" helper with methods like "add", "substract",
"multiple", etc...

Is this possible???

--

Simon Mundy | Director | PEPTOLAB

""" " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "

202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com

Reply via email to