Welcome Guest, Not a member yet? Register   Sign In
Static object inside class
#1

[eluser]venksster[/eluser]
OK this is not a CI related query per se, but since this section said "anything related to programming", i decided to post...

this is similar to what i have as my libraries (application/libraries):

class Foo
{
public func() {}

}

class Bar
{
public Bar() { foob=new Foo(); }

public static foob;

}

----------------
Now I wish to reference the func() function inside foob object through bar class

I tried
Bar::$foob->func() // Doesnt work
Bar::$foob.func() // Doesnt work

Any ideas?

Thanks in advance!


Messages In This Thread
Static object inside class - by El Forum - 12-17-2008, 10:30 AM
Static object inside class - by El Forum - 12-17-2008, 10:34 AM
Static object inside class - by El Forum - 12-17-2008, 10:55 AM
Static object inside class - by El Forum - 12-17-2008, 11:54 AM
Static object inside class - by El Forum - 12-17-2008, 12:02 PM
Static object inside class - by El Forum - 12-17-2008, 12:07 PM
Static object inside class - by El Forum - 12-17-2008, 01:31 PM
Static object inside class - by El Forum - 12-20-2008, 10:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB