21281 Posts in 5729 Topics by 2600 members
General Questions
SilverStripe Forums » General Questions » Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 1985 Views |
-
Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 1:13am
Hi,
How is possible to use Zend or Codeigniter with SilverStripe?
Is there an example?Thanks
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 5:45pm
SilverStripe core uses Zend for some parts - Zend_Log, Zend_Cache and Zend_Date are the 3 places I remember. Zend is really nice to include as it is quite abstracted. Ideally what you want is to not autoload it, but to require it (using the standard php require()).
If this is for your own site the common pattern for include thirdparty libraries is to make a mysite/thirdparty/ folder. Add a blank '_manifest_include' file to that folder. Then in your SilverStripe code when you require Zend simply add require_once('../mysite/thirdparty/Zend/somefile.php');
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 5:46pm
.. also if you need reference look at sapphire/dev/Log.php
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 9:26pm
Hi,
Where Do I see an example?
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 10:21pm
Hi willr
Why is it a bad idea to autoload a thirdparty framework? Will it slow the site or? And what does a blank '_manifest_include' actually do?
Joel
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 11:53pm Last edited: 11 March 2011 11:54pm
Why is it a bad idea to autoload a thirdparty framework?
Because you want to avoid possible conflicts with autoload.
And what does a blank '_manifest_include' actually do?
Nothing. I'm sure Willr meant "_manifest_exclude". Such file will exclude the folder from the manifest.
Where Do I see an example?
require_once 'Zend/Log.php';
public static $logger_class = 'SS_ZendLog';
self::$logger = new self::$logger_class; -
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

11 March 2011 at 11:54pm
Thanks!
-
Re: Use Sapphire and other PHP lib/framewrok (Zend/CodeIgniter...). How?

12 March 2011 at 12:28am
Where is?
require_once 'Zend/Log.php';
public static $logger_class = 'SS_ZendLog';
self::$logger = new self::$logger_class;
| 1985 Views | ||
| Go to Top | Next > |



