- * * string : the string to localize - *- * - * Examples: - *
- * {t "Hello"}
- * {t $header}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano - * * route : the route name, optional (by default the current url is returned) - * * params : an array with variables to build the route, optional - * * options : an array of options to pass to the routing object, optional - * * rest : for convenience, you can just pass named parameters that will be used as - * the params array, but you must not provide the params array in this case - *- * - * Examples: - *
- * {a url("route.name" array(param="Value", param2=$otherVal))}Here is a link{/a}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano The page you are looking at is being generated dynamically by CodeIgniter in combination with the 'Smarty-killer' Dwoo template engine. -The page is rendered at {$itshowlate} by the Dwoo_compiler.
- -If you would like to edit this page you'll find it located at:
-application/views/dwoowelcome.tpl
-
-The corresponding controller for this page is found at:
-application/controllers/dwoowelcome.php
-
-The library for Dwoo integration can be found at:
-application/libraries/Dwootemplate.php
-
-If you are exploring Dwoo for the very first time, you should start by reading the {anchor uri='http://dwoo.org/' title='Dwoo website'}.
-If you are exploring CodeIgniter for the very first time, you should start by reading the {anchor uri='http://codeigniter.com/user_guide/' title='User Guide'}.
- --Usage: -$this->load->library('Dwootemplate'); -$this->dwootemplate->assign('test', 'test'); -$this->dwootemplate->display('dwoowelcome.tpl'); --{/block} \ No newline at end of file diff --git a/system/libs/dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl b/system/libs/dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl deleted file mode 100644 index 42a6bfcd..00000000 --- a/system/libs/dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl +++ /dev/null @@ -1,57 +0,0 @@ - - -
- * return array($this, "callbackHelper");
- * // and callbackHelper would be as such:
- * public function callbackHelper(array $rest=array()){}
- *
- *
- * @param string $name the plugin name
- * @return callback
- */
- public function getCallback($name) {
- return array($this->view->getHelper($name), $name);
- }
-
- /**
- * returns some code that will check if the plugin is loaded and if not load it
- * this is optional, if your plugins are autoloaded or whatever, just return an
- * empty string
- *
- * @param string $name the plugin name
- * @return string
- */
- public function getLoader($name) {
- return '';
- }
-}
\ No newline at end of file
diff --git a/system/libs/dwoo/Dwoo/Adapters/ZendFramework/README b/system/libs/dwoo/Dwoo/Adapters/ZendFramework/README
deleted file mode 100644
index 51d70943..00000000
--- a/system/libs/dwoo/Dwoo/Adapters/ZendFramework/README
+++ /dev/null
@@ -1,32 +0,0 @@
-// ------------------------
-// Usage example :
-// ------------------------
-// Note that you might need to manually include 'lib/Dwoo.php',
-// 'lib/Dwoo/Adapters/ZendFramework/View.php' and
-// 'lib/Dwoo/Adapters/ZendFramework/PluginProxy.php' for this to
-// work as expected, depending on your ZF setup
-//
-// If anyone writes a more advanced how-to please let me know
-// ------------------------
-
-$view = new Dwoo_Adapters_ZendFramework_View(array(
- 'compileDir' => 'path/to/compile_dir' // set to null or remove this line to use defaults
- 'cacheDir' => 'path/to/cache_dir' // set to null or remove this line to use defaults
-));
-
-// This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper)
-
-$view->setPluginProxy(new Dwoo_Adapters_ZendFramework_PluginProxy(new Zend_View()));
-
-
-// 1. example - used with the Zend Controller
-
-$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view);
-
-Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
-
-
-// 2. example - used manually
-
-$view->assign('foo', 'bar');
-$view->display('foobar.phtml');
\ No newline at end of file
diff --git a/system/libs/dwoo/Dwoo/Adapters/ZendFramework/View.php b/system/libs/dwoo/Dwoo/Adapters/ZendFramework/View.php
deleted file mode 100644
index faa840cf..00000000
--- a/system/libs/dwoo/Dwoo/Adapters/ZendFramework/View.php
+++ /dev/null
@@ -1,512 +0,0 @@
-
- * @author Stephan Wentz '.print_r(htmlentities($tpl), true).'
'; - $lines = preg_split('{\r\n|\n|'; - - $this->template = $this->dwoo = null; - $tpl = null; - - return $output; - } - - /** - * checks what sub-templates are used in every sub-template so that we're sure they are all compiled - * - * @param string $function the sub-template name - */ - protected function resolveSubTemplateDependencies($function) - { - $body = $this->templatePlugins[$function]['body']; - foreach ($this->templatePlugins as $func => $attr) { - if ($func !== $function && !isset($attr['called']) && strpos($body, 'Dwoo_Plugin_'.$func) !== false) { - $this->templatePlugins[$func]['called'] = true; - $this->resolveSubTemplateDependencies($func); - } - } - $this->templatePlugins[$function]['checked'] = true; - } - - /** - * adds compiled content to the current block - * - * @param string $content the content to push - * @param int $lineCount newlines count in content, optional - */ - public function push($content, $lineCount = null) - { - if ($lineCount === null) { - $lineCount = substr_count($content, "\n"); - } - - if ($this->curBlock['buffer'] === null && count($this->stack) > 1) { - // buffer is not initialized yet (the block has just been created) - $this->stack[count($this->stack)-2]['buffer'] .= (string) $content; - $this->curBlock['buffer'] = ''; - } else { - if (!isset($this->curBlock['buffer'])) { - throw new Dwoo_Compilation_Exception($this, 'The template has been closed too early, you probably have an extra block-closing tag somewhere'); - } - // append current content to current block's buffer - $this->curBlock['buffer'] .= (string) $content; - } - $this->line += $lineCount; - } - - /** - * sets the scope - * - * set to null if the scope becomes "unstable" (i.e. too variable or unknown) so that - * variables are compiled in a more evaluative way than just $this->scope['key'] - * - * @param mixed $scope a string i.e. "level1.level2" or an array i.e. array("level1", "level2") - * @param bool $absolute if true, the scope is set from the top level scope and not from the current scope - * @return array the current scope tree - */ - public function setScope($scope, $absolute = false) - { - $old = $this->scopeTree; - - if ($scope===null) { - unset($this->scope); - $this->scope = null; - } - - if (is_array($scope)===false) { - $scope = explode('.', $scope); - } - - if ($absolute===true) { - $this->scope =& $this->data; - $this->scopeTree = array(); - } - - while (($bit = array_shift($scope)) !== null) { - if ($bit === '_parent' || $bit === '_') { - array_pop($this->scopeTree); - reset($this->scopeTree); - $this->scope =& $this->data; - $cnt = count($this->scopeTree); - for ($i=0;$i<$cnt;$i++) - $this->scope =& $this->scope[$this->scopeTree[$i]]; - } elseif ($bit === '_root' || $bit === '__') { - $this->scope =& $this->data; - $this->scopeTree = array(); - } elseif (isset($this->scope[$bit])) { - $this->scope =& $this->scope[$bit]; - $this->scopeTree[] = $bit; - } else { - $this->scope[$bit] = array(); - $this->scope =& $this->scope[$bit]; - $this->scopeTree[] = $bit; - } - } - - return $old; - } - - /** - * adds a block to the top of the block stack - * - * @param string $type block type (name) - * @param array $params the parameters array - * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 - * @return string the preProcessing() method's output - */ - public function addBlock($type, array $params, $paramtype) - { - $class = 'Dwoo_Plugin_'.$type; - if (class_exists($class, false) === false) { - $this->dwoo->getLoader()->loadPlugin($type); - } - - $params = $this->mapParams($params, array($class, 'init'), $paramtype); - - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); - } - - /** - * adds a custom block to the top of the block stack - * - * @param string $type block type (name) - * @param array $params the parameters array - * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 - * @return string the preProcessing() method's output - */ - public function addCustomBlock($type, array $params, $paramtype) - { - $callback = $this->customPlugins[$type]['callback']; - if (is_array($callback)) { - $class = is_object($callback[0]) ? get_class($callback[0]) : $callback[0]; - } else { - $class = $callback; - } - - $params = $this->mapParams($params, array($class, 'init'), $paramtype); - - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => true, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); - } - - /** - * injects a block at the top of the plugin stack without calling its preProcessing method - * - * used by {else} blocks to re-add themselves after having closed everything up to their parent - * - * @param string $type block type (name) - * @param array $params parameters array - */ - public function injectBlock($type, array $params) - { - $class = 'Dwoo_Plugin_'.$type; - if (class_exists($class, false) === false) { - $this->dwoo->getLoader()->loadPlugin($type); - } - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - } - - /** - * removes the closest-to-top block of the given type and all other - * blocks encountered while going down the block stack - * - * @param string $type block type (name) - * @return string the output of all postProcessing() method's return values of the closed blocks - */ - public function removeBlock($type) - { - $output = ''; - - $pluginType = $this->getPluginType($type); - if ($pluginType & Dwoo::SMARTY_BLOCK) { - $type = 'smartyinterface'; - } - while (true) { - while ($top = array_pop($this->stack)) { - if ($top['custom']) { - $class = $top['class']; - } else { - $class = 'Dwoo_Plugin_'.$top['type']; - } - if (count($this->stack)) { - $this->curBlock =& $this->stack[count($this->stack)-1]; - $this->push(call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']), 0); - } else { - $null = null; - $this->curBlock =& $null; - $output = call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']); - } - - if ($top['type'] === $type) { - break 2; - } - } - - throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of type "'.$type.'" was closed but was not opened'); - break; - } - - return $output; - } - - /** - * returns a reference to the first block of the given type encountered and - * optionally closes all blocks until it finds it - * - * this is mainly used by {else} plugins to close everything that was opened - * between their parent and themselves - * - * @param string $type the block type (name) - * @param bool $closeAlong whether to close all blocks encountered while going down the block stack or not - * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, - * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) - */ - public function &findBlock($type, $closeAlong = false) - { - if ($closeAlong===true) { - while ($b = end($this->stack)) { - if ($b['type']===$type) { - return $this->stack[key($this->stack)]; - } - $this->push($this->removeTopBlock(), 0); - } - } else { - end($this->stack); - while ($b = current($this->stack)) { - if ($b['type']===$type) { - return $this->stack[key($this->stack)]; - } - prev($this->stack); - } - } - - throw new Dwoo_Compilation_Exception($this, 'A parent block of type "'.$type.'" is required and can not be found'); - } - - /** - * returns a reference to the current block array - * - * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, - * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) - */ - public function &getCurrentBlock() - { - return $this->curBlock; - } - - /** - * removes the block at the top of the stack and calls its postProcessing() method - * - * @return string the postProcessing() method's output - */ - public function removeTopBlock() - { - $o = array_pop($this->stack); - if ($o === null) { - throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of unknown type was closed but was not opened.'); - } - if ($o['custom']) { - $class = $o['class']; - } else { - $class = 'Dwoo_Plugin_'.$o['type']; - } - - $this->curBlock =& $this->stack[count($this->stack)-1]; - - return call_user_func(array($class, 'postProcessing'), $this, $o['params'], '', '', $o['buffer']); - } - - /** - * returns the compiled parameters (for example a variable's compiled parameter will be "$this->scope['key']") out of the given parameter array - * - * @param array $params parameter array - * @return array filtered parameters - */ - public function getCompiledParams(array $params) - { - foreach ($params as $k=>$p) { - if (is_array($p)) { - $params[$k] = $p[0]; - } - } - return $params; - } - - /** - * returns the real parameters (for example a variable's real parameter will be its key, etc) out of the given parameter array - * - * @param array $params parameter array - * @return array filtered parameters - */ - public function getRealParams(array $params) - { - foreach ($params as $k=>$p) { - if (is_array($p)) { - $params[$k] = $p[1]; - } - } - return $params; - } - - /** - * entry point of the parser, it redirects calls to other parse* functions - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parse($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - if ($to === null) { - $to = strlen($in); - } - $first = substr($in, $from, 1); - - if ($first === false) { - throw new Dwoo_Compilation_Exception($this, 'Unexpected EOF, a template tag was not closed'); - } - - while ($first===" " || $first==="\n" || $first==="\t" || $first==="\r") { - if ($curBlock === 'root' && substr($in, $from, strlen($this->rd)) === $this->rd) { - // end template tag - $pointer += strlen($this->rd); - if ($this->debug) echo 'TEMPLATE PARSING ENDED
}', highlight_string(($output), true)); - array_shift($lines); - foreach ($lines as $i=>$line) { - echo ($i+1).'. '.$line."\r\n"; - } - } - if ($this->debug) echo '
- * return array($this, "callbackHelper");
- * // and callbackHelper would be as such:
- * public function callbackHelper(array $rest=array()){}
- *
- *
- * @param string $name the plugin name
- * @return callback
- */
- public function getCallback($name);
-
- /**
- * returns some code that will check if the plugin is loaded and if not load it
- * this is optional, if your plugins are autoloaded or whatever, just return an
- * empty string
- *
- * @param string $name the plugin name
- * @return string
- */
- public function getLoader($name);
-}
\ No newline at end of file
diff --git a/system/libs/dwoo/Dwoo/ITemplate.php b/system/libs/dwoo/Dwoo/ITemplate.php
deleted file mode 100644
index 5c83dcb0..00000000
--- a/system/libs/dwoo/Dwoo/ITemplate.php
+++ /dev/null
@@ -1,150 +0,0 @@
-
- * @copyright Copyright (c) 2008, Jordi Boggiano
- * @license http://dwoo.org/LICENSE Modified BSD License
- * @link http://dwoo.org/
- * @version 1.1.0
- * @date 2009-07-18
- * @package Dwoo
- */
-interface Dwoo_ITemplate
-{
- /**
- * returns the cache duration for this template
- *
- * defaults to null if it was not provided
- *
- * @return int|null
- */
- public function getCacheTime();
-
- /**
- * sets the cache duration for this template
- *
- * can be used to set it after the object is created if you did not provide
- * it in the constructor
- *
- * @param int $seconds duration of the cache validity for this template, if
- * null it defaults to the Dwoo instance's cache time. 0 = disable and
- * -1 = infinite cache
- */
- public function setCacheTime($seconds = null);
-
- /**
- * returns the cached template output file name, true if it's cache-able but not cached
- * or false if it's not cached
- *
- * @param Dwoo $dwoo the dwoo instance that requests it
- * @return string|bool
- */
- public function getCachedTemplate(Dwoo $dwoo);
-
- /**
- * caches the provided output into the cache file
- *
- * @param Dwoo $dwoo the dwoo instance that requests it
- * @param string $output the template output
- * @return mixed full path of the cached file or false upon failure
- */
- public function cache(Dwoo $dwoo, $output);
-
- /**
- * clears the cached template if it's older than the given time
- *
- * @param Dwoo $dwoo the dwoo instance that was used to cache that template
- * @param int $olderThan minimum time (in seconds) required for the cache to be cleared
- * @return bool true if the cache was not present or if it was deleted, false if it remains there
- */
- public function clearCache(Dwoo $dwoo, $olderThan = -1);
-
- /**
- * returns the compiled template file name
- *
- * @param Dwoo $dwoo the dwoo instance that requests it
- * @param Dwoo_ICompiler $compiler the compiler that must be used
- * @return string
- */
- public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null);
-
- /**
- * returns the template name
- *
- * @return string
- */
- public function getName();
-
- /**
- * returns the resource name for this template class
- *
- * @return string
- */
- public function getResourceName();
-
- /**
- * returns the resource identifier for this template or false if it has no identifier
- *
- * @return string|false
- */
- public function getResourceIdentifier();
-
- /**
- * returns the template source of this template
- *
- * @return string
- */
- public function getSource();
-
- /**
- * returns an unique string identifying the current version of this template,
- * for example a timestamp of the last modified date or a hash of the template source
- *
- * @return string
- */
- public function getUid();
-
- /**
- * returns the compiler used by this template, if it was just compiled, or null
- *
- * @return Dwoo_ICompiler
- */
- public function getCompiler();
-
- /**
- * returns some php code that will check if this template has been modified or not
- *
- * if the function returns null, the template will be instanciated and then the Uid checked
- *
- * @return string
- */
- public function getIsModifiedCode();
-
- /**
- * returns a new template object from the given resource identifier, null if no include is
- * possible (resource not found), or false if include is not permitted by this resource type
- *
- * this method should also check if $dwoo->getSecurityPolicy() is null or not and do the
- * necessary permission checks if required, if the security policy prevents the template
- * generation it should throw a new Dwoo_Security_Exception with a relevant message
- *
- * @param mixed $resourceId the resource identifier
- * @param int $cacheTime duration of the cache validity for this template,
- * if null it defaults to the Dwoo instance that will
- * render this template
- * @param string $cacheId the unique cache identifier of this page or anything else that
- * makes this template's content unique, if null it defaults
- * to the current url
- * @param string $compileId the unique compiled identifier, which is used to distinguish this
- * template from others, if null it defaults to the filename+bits of the path
- * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through
- * an include, extends or any other plugin)
- * @return Dwoo_ITemplate|null|false
- */
- public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null);
-}
diff --git a/system/libs/dwoo/Dwoo/Loader.php b/system/libs/dwoo/Dwoo/Loader.php
deleted file mode 100644
index 437a1285..00000000
--- a/system/libs/dwoo/Dwoo/Loader.php
+++ /dev/null
@@ -1,147 +0,0 @@
-
- * @copyright Copyright (c) 2008, Jordi Boggiano
- * @license http://dwoo.org/LICENSE Modified BSD License
- * @link http://dwoo.org/
- * @version 1.1.0
- * @date 2009-07-18
- * @package Dwoo
- */
-class Dwoo_Loader implements Dwoo_ILoader
-{
- /**
- * stores the plugin directories
- *
- * @see addDirectory
- * @var array
- */
- protected $paths = array();
-
- /**
- * stores the plugins names/paths relationships
- * don't edit this on your own, use addDirectory
- *
- * @see addDirectory
- * @var array
- */
- protected $classPath = array();
-
- /**
- * path where class paths cache files are written
- *
- * @var string
- */
- protected $cacheDir;
-
- protected $corePluginDir;
-
- public function __construct($cacheDir)
- {
- $this->corePluginDir = DWOO_DIRECTORY . 'plugins';
- $this->cacheDir = rtrim($cacheDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
-
- // include class paths or rebuild paths if the cache file isn't there
- $cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php';
- if (file_exists($cacheFile)) {
- $classpath = file_get_contents($cacheFile);
- $this->classPath = unserialize($classpath) + $this->classPath;
- } else {
- $this->rebuildClassPathCache($this->corePluginDir, $cacheFile);
- }
- }
-
- /**
- * rebuilds class paths, scans the given directory recursively and saves all paths in the given file
- *
- * @param string $path the plugin path to scan
- * @param string $cacheFile the file where to store the plugin paths cache, it will be overwritten
- */
- protected function rebuildClassPathCache($path, $cacheFile)
- {
- if ($cacheFile!==false) {
- $tmp = $this->classPath;
- $this->classPath = array();
- }
-
- // iterates over all files/folders
- $list = glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*');
- if (is_array($list)) {
- foreach ($list as $f) {
- if (is_dir($f)) {
- $this->rebuildClassPathCache($f, false);
- } else {
- $this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f;
- }
- }
- }
-
- // save in file if it's the first call (not recursed)
- if ($cacheFile!==false) {
- if (!file_put_contents($cacheFile, serialize($this->classPath))) {
- throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()');
- }
- $this->classPath += $tmp;
- }
- }
-
- /**
- * loads a plugin file
- *
- * @param string $class the plugin name, without the Dwoo_Plugin_ prefix
- * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true
- */
- public function loadPlugin($class, $forceRehash = true)
- {
- // a new class was added or the include failed so we rebuild the cache
- if (!isset($this->classPath[$class]) || !(include $this->classPath[$class])) {
- if ($forceRehash) {
- $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php');
- foreach ($this->paths as $path=>$file) {
- $this->rebuildClassPathCache($path, $file);
- }
- if (isset($this->classPath[$class])) {
- include $this->classPath[$class];
- } else {
- throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
- }
- } else {
- throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE);
- }
- }
- }
-
- /**
- * adds a plugin directory, the plugins found in the new plugin directory
- * will take precedence over the other directories (including the default
- * dwoo plugin directory), you can use this for example to override plugins
- * in a specific directory for a specific application while keeping all your
- * usual plugins in the same place for all applications.
- *
- * TOCOM don't forget that php functions overrides are not rehashed so you
- * need to clear the classpath caches by hand when adding those
- *
- * @param string $pluginDirectory the plugin path to scan
- */
- public function addDirectory($pluginDirectory)
- {
- $pluginDir = realpath($pluginDirectory);
- if (!$pluginDir) {
- throw new Dwoo_Exception('Plugin directory does not exist or can not be read : '.$pluginDirectory);
- }
- $cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php';
- $this->paths[$pluginDir] = $cacheFile;
- if (file_exists($cacheFile)) {
- $classpath = file_get_contents($cacheFile);
- $this->classPath = unserialize($classpath) + $this->classPath;
- } else {
- $this->rebuildClassPathCache($pluginDir, $cacheFile);
- }
- }
-}
diff --git a/system/libs/dwoo/Dwoo/Plugin.php b/system/libs/dwoo/Dwoo/Plugin.php
deleted file mode 100644
index 053448c9..00000000
--- a/system/libs/dwoo/Dwoo/Plugin.php
+++ /dev/null
@@ -1,85 +0,0 @@
-process() method, it will receive the parameters that
- * are in the template code
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {* Create a simple link out of an url variable and add a special class attribute: *}
- *
- * {a $url class="external" /}
- *
- * {* Mark a link as active depending on some other variable : *}
- *
- * {a $link.url class=tif($link.active "active"); $link.title /}
- *
- * {* This is similar to: {$link.title} *}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {capture "foo"}
- * Anything in here won't show, it will be saved for later use..
- * {/capture}
- * Output was : {$.capture.foo}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {foreach $array val}
- * {$val.something}
- * {/foreach}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {foreach $variable value}
- * {$value.foo} {$value.bar}
- * {/foreach}
- *
- *
- * you can do :
- *
- *
- * {loop $variable}
- * {$foo} {$bar}
- * {/loop}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {if $long.boring.prefix}
- * {$long.boring.prefix.val} - {$long.boring.prefix.secondVal} - {$long.boring.prefix.thirdVal}
- * {/if}
- *
- *
- * you can use :
- *
- *
- * {with $long.boring.prefix}
- * {$val} - {$secondVal} - {$thirdVal}
- * {/with}
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {$c=2}
- * {math "(a+b)*$c/4" a=3 b=5}
- *
- * output is : 4 ( = (3+5)*2/4)
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano - * * value : the string to process - *- * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano
- * {"a b c d
- *
- * e"|whitespace}
- *
- * results in : a b c d e
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano
- * {array(a, b, c)} results in array(0=>'a', 1=>'b', 2=>'c')
- * {array(a=foo, b=5, c=array(4,5))} results in array('a'=>'foo', 'b'=>5, 'c'=>array(0=>4, 1=>5))
- *
- *
- * This software is provided 'as-is', without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from the use of this software.
- *
- * @author Jordi Boggiano