Lines Matching refs:prefix

104      * @param string       $prefix  The prefix
108 public function add($prefix, $paths, $prepend = false) argument
110 if (!$prefix) {
126 $first = $prefix[0];
127 if (!isset($this->prefixesPsr0[$first][$prefix])) {
128 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
133 $this->prefixesPsr0[$first][$prefix] = array_merge(
135 $this->prefixesPsr0[$first][$prefix]
138 $this->prefixesPsr0[$first][$prefix] = array_merge(
139 $this->prefixesPsr0[$first][$prefix],
149 * @param string $prefix The prefix/namespace, with trailing '\\'
155 public function addPsr4($prefix, $paths, $prepend = false) argument
157 if (!$prefix) {
170 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172 $length = strlen($prefix);
173 if ('\\' !== $prefix[$length - 1]) {
176 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
177 $this->prefixDirsPsr4[$prefix] = (array) $paths;
180 $this->prefixDirsPsr4[$prefix] = array_merge(
182 $this->prefixDirsPsr4[$prefix]
186 $this->prefixDirsPsr4[$prefix] = array_merge(
187 $this->prefixDirsPsr4[$prefix],
197 * @param string $prefix The prefix
200 public function set($prefix, $paths) argument
202 if (!$prefix) {
205 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
213 * @param string $prefix The prefix/namespace, with trailing '\\'
218 public function setPsr4($prefix, $paths) argument
220 if (!$prefix) {
223 $length = strlen($prefix);
224 if ('\\' !== $prefix[$length - 1]) {
227 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
228 $this->prefixDirsPsr4[$prefix] = (array) $paths;
351 foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352 if (0 === strpos($class, $prefix)) {
353 foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
380 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381 if (0 === strpos($class, $prefix)) {