I have created an EE2 plugin under third_party folder and it succesfully shows up in Plugins list @ backend.
Now, is it possible to create an instance of that plugin class directly from a template as I don't need any template tag behaviour? Eg.
<?php
$cart = new Cart;
?>
Where as the plugin would have the following structure:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array();
/**
* Cart Class
* ...
*/
class Cart {
var $return_data;
function Cart() {
}
...
}
?>
OR, is there a better way in achieving this preserving the possibility to use tags later on? Thanks!