Welcome Guest, Not a member yet? Register   Sign In
[ask]Controller: doing other function in a function.
#4

[eluser]metaltapimenye[/eluser]
[quote author="xwero" date="1198855394"]Each function or variable in a class can be called by using $this-> so your code would be
Code:
class Example extends Controller {

  function doingA($varA,$varB){
    $varA+$varB;
  }

  function doingB($varA,$varB){
        return $this->doingA($varA,$varB)+1;
  }

}
I don't know why you want to specify it to $varC. If you return the result of the doingB method you can use it for other purposes.[/quote]

well lets say sometimes some methods oftenly not as simplier as sum $varA & $varB.. or sometimes i just want to get some $data['part'] stuff.. thx xwero, i hvn't try it yet.. but it just a kind of answer that i expected.

@Grahack: thx, but my nerves getting tense up when reading 'library' stuff..>_<


Messages In This Thread
[ask]Controller: doing other function in a function. - by El Forum - 12-28-2007, 02:13 AM
[ask]Controller: doing other function in a function. - by El Forum - 12-28-2007, 03:23 AM
[ask]Controller: doing other function in a function. - by El Forum - 12-28-2007, 03:59 AM
[ask]Controller: doing other function in a function. - by El Forum - 01-02-2008, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB