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
108 $this->vendorDir = $vendorDir;
117 if (!empty($this->prefixesPsr0)) {
118 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
129 return $this->prefixDirsPsr4;
137 return $this->fallbackDirsPsr0;
145 return $this->fallbackDirsPsr4;
153 return $this->classMap;
163 if ($this->classMap) {
164 $this->classMap = array_merge($this->classMap, $classMap);
166 $this->classMap = $classMap;
172 * appending or prepending to the ones previously set for this prefix.
185 $this->fallbackDirsPsr0 = array_merge(
187 $this->fallbackDirsPsr0
190 $this->fallbackDirsPsr0 = array_merge(
191 $this->fallbackDirsPsr0,
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],
220 * appending or prepending to the ones previously set for this namespace.
236 $this->fallbackDirsPsr4 = array_merge(
238 $this->fallbackDirsPsr4
241 $this->fallbackDirsPsr4 = array_merge(
242 $this->fallbackDirsPsr4,
246 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
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],
271 * replacing any others previously set for this prefix.
281 $this->fallbackDirsPsr0 = (array) $paths;
283 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
289 * replacing any others previously set for this namespace.
301 $this->fallbackDirsPsr4 = (array) $paths;
307 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
308 $this->prefixDirsPsr4[$prefix] = (array) $paths;
321 $this->useIncludePath = $useIncludePath;
332 return $this->useIncludePath;
345 $this->classMapAuthoritative = $classMapAuthoritative;
355 return $this->classMapAuthoritative;
367 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
377 return $this->apcuPrefix;
381 * Registers this instance as an autoloader.
389 spl_autoload_register(array($this, 'loadClass'), true, $prepend);
391 if (null === $this->vendorDir) {
396 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
398 unset(self::$registeredLoaders[$this->vendorDir]);
399 self::$registeredLoaders[$this->vendorDir] = $this;
404 * Unregisters this instance as an autoloader.
410 spl_autoload_unregister(array($this, 'loadClass'));
412 if (null !== $this->vendorDir) {
413 unset(self::$registeredLoaders[$this->vendorDir]);
425 if ($file = $this->findFile($class)) {
445 if (isset($this->classMap[$class])) {
446 return $this->classMap[$class];
448 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
451 if (null !== $this->apcuPrefix) {
452 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
458 $file = $this->findFileWithExtension($class, '.php');
462 $file = $this->findFileWithExtension($class, '.hh');
465 if (null !== $this->apcuPrefix) {
466 apcu_add($this->apcuPrefix.$class, $file);
470 // Remember that this class does not exist.
471 $this->missingClasses[$class] = true;
498 if (isset($this->prefixLengthsPsr4[$first])) {
503 if (isset($this->prefixDirsPsr4[$search])) {
505 foreach ($this->prefixDirsPsr4[$search] as $dir) {
515 foreach ($this->fallbackDirsPsr4 as $dir) {
531 if (isset($this->prefixesPsr0[$first])) {
532 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
544 foreach ($this->fallbackDirsPsr0 as $dir) {
551 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
570 * Prevents access to $this/self from included files.