Welcome Guest, Not a member yet? Register   Sign In
Accessing a classes static var in a controller
#5

[eluser]Michael Ekoka[/eluser]
@stevefink:
- about accessing static variables with the scope resolution operator: I think you answered your question in the first post. If the variable is static, it means that it belongs to the non instantiated class, not its objects. So you can access it with the class name Foo::$bar, even inside your controller.
- about the error message: yes it means that the library's object wasn't instantiated.


Messages In This Thread
Accessing a classes static var in a controller - by El Forum - 04-17-2008, 07:03 PM
Accessing a classes static var in a controller - by El Forum - 04-17-2008, 07:17 PM
Accessing a classes static var in a controller - by El Forum - 04-17-2008, 07:21 PM
Accessing a classes static var in a controller - by El Forum - 04-17-2008, 07:29 PM
Accessing a classes static var in a controller - by El Forum - 04-17-2008, 08:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB