thrownewDwoo_Exception('DWOO_CACHE_DIRECTORY is deprecated, you should now set this in Dwoo\'s constructor using new Dwoo([ $compileDir [, $cacheDir ]])');
if(defined('DWOO_COMPILE_DIRECTORY'))
thrownewDwoo_Exception('DWOO_COMPILE_DIRECTORY is deprecated, you should now set this in Dwoo\'s constructor using new Dwoo([ $compileDir [, $cacheDir ]])');
// end
if(defined('DWOO_CHMOD')===false)
define('DWOO_CHMOD',0777);
if(is_writable(DWOO_CACHE_DIRECTORY)===false)
thrownewDwoo_Exception('Dwoo cache directory must be writable, either chmod "'.DWOO_CACHE_DIRECTORY.'" to make it writable or define DWOO_CACHE_DIRECTORY to a writable directory before including Dwoo.php');
if(is_writable(DWOO_COMPILE_DIRECTORY)===false)
thrownewDwoo_Exception('Dwoo compile directory must be writable, either chmod "'.DWOO_COMPILE_DIRECTORY.'" to make it writable or define DWOO_COMPILE_DIRECTORY to a writable directory before including Dwoo.php');
// include class paths or rebuild paths if the cache file isn't there
thrownewDwoo_Exception('Wrong pre-processor name, when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Processor_name"');
thrownewDwoo_Exception('Wrong post-processor name, when using autoload the processor must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Processor_name"');
thrownewDwoo_Exception('Processor '.$name.' could not be found in your plugin directories, please ensure it is in a file named '.$name.'.php in the plugin directory');
}
}
if(class_exists($class,false)){
returnarray(new$class($this),'process');
}
if(function_exists($class)){
return$class;
}
thrownewDwoo_Exception('Wrong processor name, when using autoload the processor must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Processor_name"');
}
/**
* adds the custom plugins loaded into Dwoo to the compiler so it can load them
...
...
@@ -465,7 +484,7 @@ class Dwoo_Compiler implements Dwoo_ICompiler
if($isOffset){
$this->line+=$number;
}else{
$this->line=$position;
$this->line=$number;
}
}
...
...
@@ -540,6 +559,9 @@ class Dwoo_Compiler implements Dwoo_ICompiler
thrownewDwoo_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)');
thrownewDwoo_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()');
}
self::$classpath+=$tmp;
$this->classPath+=$tmp;
}
}
...
...
@@ -80,17 +104,17 @@ class Dwoo_Loader
* @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