Welcome Guest, Not a member yet? Register   Sign In
PHP5 OOP Standards
#11

[eluser]Dam1an[/eluser]
[quote author="sl3dg3hamm3r" date="1245351742"][quote author="Dam1an" date="1245351368"]I've never seen anyone write public/protected/private[/quote]

?
I would highly suggest that for the sake of proper OOP design...[/quote]

N0xie picked up on it... maybe I should have added more emphasis to and lol
#12

[eluser]IamPrototype[/eluser]
I actually just wrote public for the heck of it. Normally in my scripts it's "var $name". I think default is public so it's faster to just skip the public. I might have confused some people here with my topic, sorry guys!

Since n0xie wrote that it's PHP4 syntax I'm using. I'm willing to change my habit and write "public $var" or just plain simple, "$var" (guess that would work either way), since my server is up to date with PHP5, so I see no point in using PHP4 syntax.

----

Edit: Would it make my scripts any more safe, if I write "private" in front of my instace ($ci). Just curious since you don't need to get instace anywhere else! (Right now I'm talking about libraries).




Theme © iAndrew 2016 - Forum software by © MyBB