* @license PHP License * @package WB * @subpackage base */ /** * Config string loader * * Load xml config string * * @version 0.1.0 * @package WB * @subpackage base */ abstract class WBConfig_Loader extends WBStdClass { /** * receive loader's name * * Return sub class' name * * @return string */ public function getName() { $prefix = strlen(__CLASS__) + 1; $class = get_class($this); return substr($class, $prefix); } /** * load XML string * * Interface to load config string * * @param string $file * @param string $data actual data loaded * @param array $expire expire hint for cache * @param bool $try try to load, don't throw an exception * @return bool true on success * @throws WBException */ abstract public function load($file, &$data, &$expire, $try = false); /** * list child nodes * * something like getChildren() * * @param string $file * @return array list of child nodes */ abstract public function ls($file); } ?>