Lines Matching refs:prefix

182      * @param string          $prefix  The prefix
188 public function add($prefix, $paths, $prepend = false) argument
190 if (!$prefix) {
206 $first = $prefix[0];
207 if (!isset($this->prefixesPsr0[$first][$prefix])) {
208 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
213 $this->prefixesPsr0[$first][$prefix] = array_merge(
215 $this->prefixesPsr0[$first][$prefix]
218 $this->prefixesPsr0[$first][$prefix] = array_merge(
219 $this->prefixesPsr0[$first][$prefix],
229 * @param string $prefix The prefix/namespace, with trailing '\\'
237 public function addPsr4($prefix, $paths, $prepend = false) argument
239 if (!$prefix) {
252 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
254 $length = strlen($prefix);
255 if ('\\' !== $prefix[$length - 1]) {
258 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
259 $this->prefixDirsPsr4[$prefix] = (array) $paths;
262 $this->prefixDirsPsr4[$prefix] = array_merge(
264 $this->prefixDirsPsr4[$prefix]
268 $this->prefixDirsPsr4[$prefix] = array_merge(
269 $this->prefixDirsPsr4[$prefix],
279 * @param string $prefix The prefix
284 public function set($prefix, $paths) argument
286 if (!$prefix) {
289 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
297 * @param string $prefix The prefix/namespace, with trailing '\\'
304 public function setPsr4($prefix, $paths) argument
306 if (!$prefix) {
309 $length = strlen($prefix);
310 if ('\\' !== $prefix[$length - 1]) {
313 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
314 $this->prefixDirsPsr4[$prefix] = (array) $paths;
537 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
538 if (0 === strpos($class, $prefix)) {