Lines Matching refs:prefix

105      * @param string       $prefix  The prefix
109 public function add($prefix, $paths, $prepend = false) argument
111 if (!$prefix) {
127 $first = $prefix[0];
128 if (!isset($this->prefixesPsr0[$first][$prefix])) {
129 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
134 $this->prefixesPsr0[$first][$prefix] = array_merge(
136 $this->prefixesPsr0[$first][$prefix]
139 $this->prefixesPsr0[$first][$prefix] = array_merge(
140 $this->prefixesPsr0[$first][$prefix],
150 * @param string $prefix The prefix/namespace, with trailing '\\'
156 public function addPsr4($prefix, $paths, $prepend = false) argument
158 if (!$prefix) {
171 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
173 $length = strlen($prefix);
174 if ('\\' !== $prefix[$length - 1]) {
177 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178 $this->prefixDirsPsr4[$prefix] = (array) $paths;
181 $this->prefixDirsPsr4[$prefix] = array_merge(
183 $this->prefixDirsPsr4[$prefix]
187 $this->prefixDirsPsr4[$prefix] = array_merge(
188 $this->prefixDirsPsr4[$prefix],
198 * @param string $prefix The prefix
201 public function set($prefix, $paths) argument
203 if (!$prefix) {
206 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
214 * @param string $prefix The prefix/namespace, with trailing '\\'
219 public function setPsr4($prefix, $paths) argument
221 if (!$prefix) {
224 $length = strlen($prefix);
225 if ('\\' !== $prefix[$length - 1]) {
228 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229 $this->prefixDirsPsr4[$prefix] = (array) $paths;
410 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 if (0 === strpos($class, $prefix)) {