Julius Posted November 7, 2011 Share Posted November 7, 2011 Hi, I'm trying to write my first MVC framework for my college project and faced this problem: i have main framework class, and have this loader class, that loads view files and libraries. Now, how can I do that when I load library, I could reach it from my main class? For example: in main class goes this code: public $load; function __construct ( ) { $this->load = new Loader; } function someFunction ( ) { $this->load->library('someLibrary'); // and now reach the library like this $this->someLibrary->functionInLibrary(); } The idea is from codeigniter, so if anyone has used this framework will understand my question. Quote Link to comment https://forums.phpfreaks.com/topic/250617-connection-between-classes/ Share on other sites More sharing options...
Julius Posted November 7, 2011 Author Share Posted November 7, 2011 If you can't understand what am I asking, just say - I will try to explain better Quote Link to comment https://forums.phpfreaks.com/topic/250617-connection-between-classes/#findComment-1285876 Share on other sites More sharing options...
Julius Posted November 7, 2011 Author Share Posted November 7, 2011 bump. please help Quote Link to comment https://forums.phpfreaks.com/topic/250617-connection-between-classes/#findComment-1285930 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.