Lines Matching refs:this

10  * file that was distributed with this source code.
30 * In this example, if you try to use a class in the Symfony\Component
111 $this->vendorDir = $vendorDir;
120 if (!empty($this->prefixesPsr0)) {
121 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
133 return $this->prefixDirsPsr4;
142 return $this->fallbackDirsPsr0;
151 return $this->fallbackDirsPsr4;
160 return $this->classMap;
171 if ($this->classMap) {
172 $this->classMap = array_merge($this->classMap, $classMap);
174 $this->classMap = $classMap;
180 * appending or prepending to the ones previously set for this prefix.
192 $this->fallbackDirsPsr0 = array_merge(
194 $this->fallbackDirsPsr0
197 $this->fallbackDirsPsr0 = array_merge(
198 $this->fallbackDirsPsr0,
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],
227 * appending or prepending to the ones previously set for this namespace.
242 $this->fallbackDirsPsr4 = array_merge(
244 $this->fallbackDirsPsr4
247 $this->fallbackDirsPsr4 = array_merge(
248 $this->fallbackDirsPsr4,
252 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
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],
277 * replacing any others previously set for this prefix.
287 $this->fallbackDirsPsr0 = (array) $paths;
289 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
295 * replacing any others previously set for this namespace.
307 $this->fallbackDirsPsr4 = (array) $paths;
313 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
314 $this->prefixDirsPsr4[$prefix] = (array) $paths;
327 $this->useIncludePath = $useIncludePath;
338 return $this->useIncludePath;
351 $this->classMapAuthoritative = $classMapAuthoritative;
361 return $this->classMapAuthoritative;
373 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
383 return $this->apcuPrefix;
387 * Registers this instance as an autoloader.
395 spl_autoload_register(array($this, 'loadClass'), true, $prepend);
397 if (null === $this->vendorDir) {
402 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
404 unset(self::$registeredLoaders[$this->vendorDir]);
405 self::$registeredLoaders[$this->vendorDir] = $this;
410 * Unregisters this instance as an autoloader.
416 spl_autoload_unregister(array($this, 'loadClass'));
418 if (null !== $this->vendorDir) {
419 unset(self::$registeredLoaders[$this->vendorDir]);
431 if ($file = $this->findFile($class)) {
451 if (isset($this->classMap[$class])) {
452 return $this->classMap[$class];
454 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
457 if (null !== $this->apcuPrefix) {
458 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
464 $file = $this->findFileWithExtension($class, '.php');
468 $file = $this->findFileWithExtension($class, '.hh');
471 if (null !== $this->apcuPrefix) {
472 apcu_add($this->apcuPrefix.$class, $file);
476 // Remember that this class does not exist.
477 $this->missingClasses[$class] = true;
504 if (isset($this->prefixLengthsPsr4[$first])) {
509 if (isset($this->prefixDirsPsr4[$search])) {
511 foreach ($this->prefixDirsPsr4[$search] as $dir) {
521 foreach ($this->fallbackDirsPsr4 as $dir) {
537 if (isset($this->prefixesPsr0[$first])) {
538 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
550 foreach ($this->fallbackDirsPsr0 as $dir) {
557 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
576 * Prevents access to $this/self from included files.