Search found 3 matches
- Tue Dec 29, 2009 5:15 pm
- Forum: PHP - Code
- Topic: OOP MVC
- Replies: 7
- Views: 1775
Re: OOP MVC
Yes, Singleton Pattern looks similar to what I tried to make. Can anyone tell what are cons and pros of using Singleton for MVC framework ? AbraCadaver, I thought it could be possible because I already called both classes in the Core class. Oh, I missed to say that before. class Core { function __co...
- Tue Dec 29, 2009 3:37 pm
- Forum: PHP - Code
- Topic: OOP MVC
- Replies: 7
- Views: 1775
Re: OOP MVC
yes, I am extending.
class Core {}
class Library1 extends Core { function test1() {} }
class Library2 extends Core { function test2() {} }
For example, I want to call $this->library2->test2() from Library1 and so on.
class Core {}
class Library1 extends Core { function test1() {} }
class Library2 extends Core { function test2() {} }
For example, I want to call $this->library2->test2() from Library1 and so on.
- Tue Dec 29, 2009 3:14 pm
- Forum: PHP - Code
- Topic: OOP MVC
- Replies: 7
- Views: 1775
OOP MVC
Hi. I'm messing with OOP and cannot understand one thing. If you have Core class, from which you call all other classes, how can the sub classes access each other. I tried to make them accessible via $this, but it doesnt seem to work. Tried to make methods public but it didnt help. Like in Subclass1...