Lines Matching refs:prefix
178 * @param string $prefix The prefix
184 public function add($prefix, $paths, $prepend = false) argument
186 if (!$prefix) {
202 $first = $prefix[0];
203 if (!isset($this->prefixesPsr0[$first][$prefix])) {
204 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
209 $this->prefixesPsr0[$first][$prefix] = array_merge(
211 $this->prefixesPsr0[$first][$prefix]
214 $this->prefixesPsr0[$first][$prefix] = array_merge(
215 $this->prefixesPsr0[$first][$prefix],
225 * @param string $prefix The prefix/namespace, with trailing '\\'
233 public function addPsr4($prefix, $paths, $prepend = false) argument
235 if (!$prefix) {
248 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
250 $length = strlen($prefix);
251 if ('\\' !== $prefix[$length - 1]) {
254 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255 $this->prefixDirsPsr4[$prefix] = (array) $paths;
258 $this->prefixDirsPsr4[$prefix] = array_merge(
260 $this->prefixDirsPsr4[$prefix]
264 $this->prefixDirsPsr4[$prefix] = array_merge(
265 $this->prefixDirsPsr4[$prefix],
275 * @param string $prefix The prefix
280 public function set($prefix, $paths) argument
282 if (!$prefix) {
285 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
293 * @param string $prefix The prefix/namespace, with trailing '\\'
300 public function setPsr4($prefix, $paths) argument
302 if (!$prefix) {
305 $length = strlen($prefix);
306 if ('\\' !== $prefix[$length - 1]) {
309 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310 $this->prefixDirsPsr4[$prefix] = (array) $paths;
533 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534 if (0 === strpos($class, $prefix)) {