Welcome Guest, Not a member yet? Register   Sign In
Where to put functions / classes?
#4

[eluser]meigwilym[/eluser]
Quote:so would I have function getphone in the mobile.php file (in the controllers folder)?

Yes (but as it's a class call them 'methods' to save any misunderstandings).

Quote:Also I presume the $1 refers to the parameter that getphone will accept?

Yup. You should have

Code:
public function getphone($phone_name) {
// code here
}

In the above case $phone_name would be HTC-Desire.

Mei


Messages In This Thread
Where to put functions / classes? - by El Forum - 02-01-2012, 04:08 AM
Where to put functions / classes? - by El Forum - 02-01-2012, 04:14 AM
Where to put functions / classes? - by El Forum - 02-01-2012, 04:27 AM
Where to put functions / classes? - by El Forum - 02-01-2012, 05:28 AM
Where to put functions / classes? - by El Forum - 02-01-2012, 05:48 AM
Where to put functions / classes? - by El Forum - 02-01-2012, 01:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB