/** * Add prefixed paths to the registry of paths * * @param string $prefix * @param mixed $paths String or an array of strings * @param boolean $prepend Put path at the beginning of the stack (has no effect when prefix / dir already set) * @return \Gems_Loader_LoaderAbstract (continuation pattern) */ public function addPrefixPath($prefix, $path, $prepend = true) { if ($this->cascade) { $newPrefix = $prefix . '_' . $this->cascade; $newPath = $path . '/' . strtr($this->cascade, '_', '/'); } else { $newPrefix = $prefix; $newPath = $path; } if ($prepend) { $this->_dirs = array($newPrefix => $newPath) + $this->_dirs; } else { $this->_dirs[$newPrefix] = $newPath; } $this->_loader->addPrefixPath($newPrefix, $newPath, $prepend); if (\MUtil_Registry_Source::$verbose) { \MUtil_Echo::r($this->_dirs, '$this->_dirs in ' . get_class($this) . '->' . __FUNCTION__ . '():'); } return $this; }
/** * Add prefixed paths to the registry of paths * * @param string $prefix * @param string $path * @return \MUtil_Snippets_SnippetLoaderInterface */ public function addPrefixPath($prefix, $path, $prepend = true) { $this->loader->addPrefixPath($prefix, $path, $prepend); return $this; }