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;
116 if (!empty($this->prefixesPsr0)) {
117 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
129 return $this->prefixDirsPsr4;
138 return $this->fallbackDirsPsr0;
147 return $this->fallbackDirsPsr4;
156 return $this->classMap;
167 if ($this->classMap) {
168 $this->classMap = array_merge($this->classMap, $classMap);
170 $this->classMap = $classMap;
176 * appending or prepending to the ones previously set for this prefix.
188 $this->fallbackDirsPsr0 = array_merge(
190 $this->fallbackDirsPsr0
193 $this->fallbackDirsPsr0 = array_merge(
194 $this->fallbackDirsPsr0,
203 if (!isset($this->prefixesPsr0[$first][$prefix])) {
204 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
209 $this->prefixesPsr0[$first][$prefix] = array_merge(
211 $this->prefixesPsr0[$first][$prefix]
214 $this->prefixesPsr0[$first][$prefix] = array_merge(
215 $this->prefixesPsr0[$first][$prefix],
223 * appending or prepending to the ones previously set for this namespace.
238 $this->fallbackDirsPsr4 = array_merge(
240 $this->fallbackDirsPsr4
243 $this->fallbackDirsPsr4 = array_merge(
244 $this->fallbackDirsPsr4,
248 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
254 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255 $this->prefixDirsPsr4[$prefix] = (array) $paths;
258 $this->prefixDirsPsr4[$prefix] = array_merge(
260 $this->prefixDirsPsr4[$prefix]
264 $this->prefixDirsPsr4[$prefix] = array_merge(
265 $this->prefixDirsPsr4[$prefix],
273 * replacing any others previously set for this prefix.
283 $this->fallbackDirsPsr0 = (array) $paths;
285 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
291 * replacing any others previously set for this namespace.
303 $this->fallbackDirsPsr4 = (array) $paths;
309 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310 $this->prefixDirsPsr4[$prefix] = (array) $paths;
323 $this->useIncludePath = $useIncludePath;
334 return $this->useIncludePath;
347 $this->classMapAuthoritative = $classMapAuthoritative;
357 return $this->classMapAuthoritative;
369 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
379 return $this->apcuPrefix;
383 * Registers this instance as an autoloader.
391 spl_autoload_register(array($this, 'loadClass'), true, $prepend);
393 if (null === $this->vendorDir) {
398 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
400 unset(self::$registeredLoaders[$this->vendorDir]);
401 self::$registeredLoaders[$this->vendorDir] = $this;
406 * Unregisters this instance as an autoloader.
412 spl_autoload_unregister(array($this, 'loadClass'));
414 if (null !== $this->vendorDir) {
415 unset(self::$registeredLoaders[$this->vendorDir]);
427 if ($file = $this->findFile($class)) {
446 if (isset($this->classMap[$class])) {
447 return $this->classMap[$class];
449 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
452 if (null !== $this->apcuPrefix) {
453 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
459 $file = $this->findFileWithExtension($class, '.php');
463 $file = $this->findFileWithExtension($class, '.hh');
466 if (null !== $this->apcuPrefix) {
467 apcu_add($this->apcuPrefix.$class, $file);
471 // Remember that this class does not exist.
472 $this->missingClasses[$class] = true;
499 if (isset($this->prefixLengthsPsr4[$first])) {
504 if (isset($this->prefixDirsPsr4[$search])) {
506 foreach ($this->prefixDirsPsr4[$search] as $dir) {
516 foreach ($this->fallbackDirsPsr4 as $dir) {
532 if (isset($this->prefixesPsr0[$first])) {
533 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
545 foreach ($this->fallbackDirsPsr0 as $dir) {
552 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
563 * Prevents access to $this/self from included files.