Hi,
How is possible to use Zend or Codeigniter with SilverStripe?
Is there an example?
Thanks
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi,
How is possible to use Zend or Codeigniter with SilverStripe?
Is there an example?
Thanks
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');
.. also if you need reference look at sapphire/dev/Log.php
Hi,
Where Do I see an example?
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
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;
Thanks!
Where is?
require_once 'Zend/Log.php';
public static $logger_class = 'SS_ZendLog';
self::$logger = new self::$logger_class;