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
66 $this->vendorDir = $vendorDir;
71 if (!empty($this->prefixesPsr0)) {
72 return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
80 return $this->prefixDirsPsr4;
85 return $this->fallbackDirsPsr0;
90 return $this->fallbackDirsPsr4;
95 return $this->classMap;
103 if ($this->classMap) {
104 $this->classMap = array_merge($this->classMap, $classMap);
106 $this->classMap = $classMap;
112 * appending or prepending to the ones previously set for this prefix.
122 $this->fallbackDirsPsr0 = array_merge(
124 $this->fallbackDirsPsr0
127 $this->fallbackDirsPsr0 = array_merge(
128 $this->fallbackDirsPsr0,
137 if (!isset($this->prefixesPsr0[$first][$prefix])) {
138 $this->prefixesPsr0[$first][$prefix] = (array) $paths;
143 $this->prefixesPsr0[$first][$prefix] = array_merge(
145 $this->prefixesPsr0[$first][$prefix]
148 $this->prefixesPsr0[$first][$prefix] = array_merge(
149 $this->prefixesPsr0[$first][$prefix],
157 * appending or prepending to the ones previously set for this namespace.
170 $this->fallbackDirsPsr4 = array_merge(
172 $this->fallbackDirsPsr4
175 $this->fallbackDirsPsr4 = array_merge(
176 $this->fallbackDirsPsr4,
180 } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
186 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
187 $this->prefixDirsPsr4[$prefix] = (array) $paths;
190 $this->prefixDirsPsr4[$prefix] = array_merge(
192 $this->prefixDirsPsr4[$prefix]
196 $this->prefixDirsPsr4[$prefix] = array_merge(
197 $this->prefixDirsPsr4[$prefix],
205 * replacing any others previously set for this prefix.
213 $this->fallbackDirsPsr0 = (array) $paths;
215 $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
221 * replacing any others previously set for this namespace.
231 $this->fallbackDirsPsr4 = (array) $paths;
237 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
238 $this->prefixDirsPsr4[$prefix] = (array) $paths;
249 $this->useIncludePath = $useIncludePath;
260 return $this->useIncludePath;
271 $this->classMapAuthoritative = $classMapAuthoritative;
281 return $this->classMapAuthoritative;
291 $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
301 return $this->apcuPrefix;
305 * Registers this instance as an autoloader.
311 spl_autoload_register(array($this, 'loadClass'), true, $prepend);
313 if (null === $this->vendorDir) {
318 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
320 unset(self::$registeredLoaders[$this->vendorDir]);
321 self::$registeredLoaders[$this->vendorDir] = $this;
326 * Unregisters this instance as an autoloader.
330 spl_autoload_unregister(array($this, 'loadClass'));
332 if (null !== $this->vendorDir) {
333 unset(self::$registeredLoaders[$this->vendorDir]);
345 if ($file = $this->findFile($class)) {
362 if (isset($this->classMap[$class])) {
363 return $this->classMap[$class];
365 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
368 if (null !== $this->apcuPrefix) {
369 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
375 $file = $this->findFileWithExtension($class, '.php');
379 $file = $this->findFileWithExtension($class, '.hh');
382 if (null !== $this->apcuPrefix) {
383 apcu_add($this->apcuPrefix.$class, $file);
387 // Remember that this class does not exist.
388 $this->missingClasses[$class] = true;
410 if (isset($this->prefixLengthsPsr4[$first])) {
415 if (isset($this->prefixDirsPsr4[$search])) {
417 foreach ($this->prefixDirsPsr4[$search] as $dir) {
427 foreach ($this->fallbackDirsPsr4 as $dir) {
443 if (isset($this->prefixesPsr0[$first])) {
444 foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
456 foreach ($this->fallbackDirsPsr0 as $dir) {
463 if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
474 * Prevents access to $this/self from included files.