Lines Matching refs:prefix

114      * @param string       $prefix  The prefix
118 public function add($prefix, $paths, $prepend = false) argument
120 if (!$prefix) {
136 $first = $prefix[0];
137 if (!isset($this->prefixesPsr0[$first][$prefix])) {
138 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
143 $this->prefixesPsr0[$first][$prefix] = array_merge(
145 $this->prefixesPsr0[$first][$prefix]
148 $this->prefixesPsr0[$first][$prefix] = array_merge(
149 $this->prefixesPsr0[$first][$prefix],
159 * @param string $prefix The prefix/namespace, with trailing '\\'
165 public function addPsr4($prefix, $paths, $prepend = false) argument
167 if (!$prefix) {
180 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
182 $length = strlen($prefix);
183 if ('\\' !== $prefix[$length - 1]) {
186 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
187 $this->prefixDirsPsr4[$prefix] = (array) $paths;
190 $this->prefixDirsPsr4[$prefix] = array_merge(
192 $this->prefixDirsPsr4[$prefix]
196 $this->prefixDirsPsr4[$prefix] = array_merge(
197 $this->prefixDirsPsr4[$prefix],
207 * @param string $prefix The prefix
210 public function set($prefix, $paths) argument
212 if (!$prefix) {
215 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
223 * @param string $prefix The prefix/namespace, with trailing '\\'
228 public function setPsr4($prefix, $paths) argument
230 if (!$prefix) {
233 $length = strlen($prefix);
234 if ('\\' !== $prefix[$length - 1]) {
237 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
238 $this->prefixDirsPsr4[$prefix] = (array) $paths;
442 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
443 if (0 === strpos($class, $prefix)) {