Lines Matching refs:prefix

69      * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
171 * Registers a set of PSR-0 directories for a given prefix, either
172 * appending or prepending to the ones previously set for this prefix.
174 * @param string $prefix The prefix
180 public function add($prefix, $paths, $prepend = false)
183 if (!$prefix) {
199 $first = $prefix[0];
200 if (!isset($this->prefixesPsr0[$first][$prefix])) {
201 $this->prefixesPsr0[$first][$prefix] = $paths;
206 $this->prefixesPsr0[$first][$prefix] = array_merge(
208 $this->prefixesPsr0[$first][$prefix]
211 $this->prefixesPsr0[$first][$prefix] = array_merge(
212 $this->prefixesPsr0[$first][$prefix],
222 * @param string $prefix The prefix/namespace, with trailing '\\'
230 public function addPsr4($prefix, $paths, $prepend = false)
233 if (!$prefix) {
246 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
248 $length = strlen($prefix);
249 if ('\\' !== $prefix[$length - 1]) {
250 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
253 $this->prefixDirsPsr4[$prefix] = $paths;
256 $this->prefixDirsPsr4[$prefix] = array_merge(
258 $this->prefixDirsPsr4[$prefix]
262 $this->prefixDirsPsr4[$prefix] = array_merge(
263 $this->prefixDirsPsr4[$prefix],
270 * Registers a set of PSR-0 directories for a given prefix,
271 * replacing any others previously set for this prefix.
273 * @param string $prefix The prefix
278 public function set($prefix, $paths)
280 if (!$prefix) {
283 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
291 * @param string $prefix The prefix/namespace, with trailing '\\'
298 public function setPsr4($prefix, $paths)
300 if (!$prefix) {
303 $length = strlen($prefix);
304 if ('\\' !== $prefix[$length - 1]) {
305 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
307 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
308 $this->prefixDirsPsr4[$prefix] = (array) $paths;
336 * Turns off searching the prefix and fallback directories for classes
359 * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
371 * The APCu prefix in use, or null if APCu caching is not enabled.
532 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
533 if (0 === strpos($class, $prefix)) {