Ticket #2 (closed Feature Request: fixed)
external classes
| Reported by: | danfreak | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.0 |
| Component: | Core | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
Add a kinda "vendor" (like in CAKEphp) folder where wo include all external classes and scripts. In order to make it working even with complex classes with several files and folder extend the php 'include_path' directory.
I always do it with a post-controller hook: [code] <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class Myclasses {
/**
- includes the directory application\my_classes\ in your includes directory * */
function index() {
//includes the directory application\my_classes\Swift\
ini_set('include_path', ini_get('include_path').';'.BASEPATH.'application/my_classes/');
}
}
?> /code
Change History
Note: See
TracTickets for help on using
tickets.
