Lines Matching refs:prefix

174      * @param string              $prefix  The prefix
180 public function add($prefix, $paths, $prepend = false) argument
183 if (!$prefix) {
199 $first = $prefix[0];
200 if (!isset($this->prefixesPsr0[$first][$prefix])) {
201 $this->prefixesPsr0[$first][$prefix] = $paths;
206 $this->prefixesPsr0[$first][$prefix] = array_merge(
208 $this->prefixesPsr0[$first][$prefix]
211 $this->prefixesPsr0[$first][$prefix] = array_merge(
212 $this->prefixesPsr0[$first][$prefix],
222 * @param string $prefix The prefix/namespace, with trailing '\\'
230 public function addPsr4($prefix, $paths, $prepend = false) argument
233 if (!$prefix) {
246 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
248 $length = strlen($prefix);
249 if ('\\' !== $prefix[$length - 1]) {
252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
253 $this->prefixDirsPsr4[$prefix] = $paths;
256 $this->prefixDirsPsr4[$prefix] = array_merge(
258 $this->prefixDirsPsr4[$prefix]
262 $this->prefixDirsPsr4[$prefix] = array_merge(
263 $this->prefixDirsPsr4[$prefix],
273 * @param string $prefix The prefix
278 public function set($prefix, $paths) argument
280 if (!$prefix) {
283 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
291 * @param string $prefix The prefix/namespace, with trailing '\\'
298 public function setPsr4($prefix, $paths) argument
300 if (!$prefix) {
303 $length = strlen($prefix);
304 if ('\\' !== $prefix[$length - 1]) {
307 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
308 $this->prefixDirsPsr4[$prefix] = (array) $paths;
532 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
533 if (0 === strpos($class, $prefix)) {