Welcome Guest, Not a member yet? Register   Sign In
Creating a new "shared" folder for models and libraries
#3

[eluser]Natebot[/eluser]
Sorry to arrive late to the party Phil.

I use symlinks in my applications' helper and library directories to common files. So far it has served me well. Although it's not a solution in the code but in the OS, my chosen repository, svn, does support symlinking so that's something I suppose.

I like what you've done here. My one suggestion is that SHAREPATH be set in the index.php file in the exact same way the other path constants, like APPPATH, are defined and testing for existance. Downside of course is that MY_Loader now depends on it, but I like keeping my path constants in one place and getting warned early if they can't be found.

@trs21219 - you can 'turn off' this extension to Loader by simply renaming MY_Loader.php and it will no longer be instantiated. However, that might not be needed as I believe Phil's code will load any application specific models and libraries (those in APPPATH) first before looking to load them from the SHAREDPATH (or the BASEPATH in the case of Libraries). So you'd only need to place a copy of the desired model into your application's model directory for your app to load it instead of the common version.

Unfortunately MY_Loader.php would have to be replicated on each application's library directory.


Messages In This Thread
Creating a new "shared" folder for models and libraries - by El Forum - 11-27-2009, 02:45 AM
Creating a new "shared" folder for models and libraries - by El Forum - 11-27-2009, 03:32 AM
Creating a new "shared" folder for models and libraries - by El Forum - 12-20-2009, 02:49 AM
Creating a new "shared" folder for models and libraries - by El Forum - 12-21-2009, 08:36 AM
Creating a new "shared" folder for models and libraries - by El Forum - 12-21-2009, 01:21 PM
Creating a new "shared" folder for models and libraries - by El Forum - 12-24-2009, 04:46 AM
Creating a new "shared" folder for models and libraries - by El Forum - 01-01-2010, 02:26 PM
Creating a new "shared" folder for models and libraries - by El Forum - 01-03-2010, 09:02 AM
Creating a new "shared" folder for models and libraries - by El Forum - 02-18-2010, 10:00 AM
Creating a new "shared" folder for models and libraries - by El Forum - 09-24-2010, 06:53 AM
Creating a new "shared" folder for models and libraries - by El Forum - 07-30-2014, 01:29 PM
Creating a new "shared" folder for models and libraries - by El Forum - 08-04-2014, 08:50 AM
Creating a new "shared" folder for models and libraries - by El Forum - 08-04-2014, 09:35 AM
Creating a new "shared" folder for models and libraries - by El Forum - 08-27-2014, 10:25 AM
Creating a new "shared" folder for models and libraries - by El Forum - 08-29-2014, 09:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB