MediaWiki REL1_31
ServiceWiring.php
Go to the documentation of this file.
1<?php
51use Wikimedia\ObjectFactory;
52
53return [
54 'DBLoadBalancerFactory' => function ( MediaWikiServices $services ) {
55 $mainConfig = $services->getMainConfig();
56
58 $mainConfig->get( 'LBFactoryConf' ),
59 $mainConfig,
60 $services->getConfiguredReadOnlyMode()
61 );
62 $class = MWLBFactory::getLBFactoryClass( $lbConf );
63
64 $instance = new $class( $lbConf );
65 MWLBFactory::setSchemaAliases( $instance, $mainConfig );
66
67 return $instance;
68 },
69
70 'DBLoadBalancer' => function ( MediaWikiServices $services ) {
71 // just return the default LB from the DBLoadBalancerFactory service
72 return $services->getDBLoadBalancerFactory()->getMainLB();
73 },
74
75 'SiteStore' => function ( MediaWikiServices $services ) {
76 $rawSiteStore = new DBSiteStore( $services->getDBLoadBalancer() );
77
78 // TODO: replace wfGetCache with a CacheFactory service.
79 // TODO: replace wfIsHHVM with a capabilities service.
81
82 return new CachingSiteStore( $rawSiteStore, $cache );
83 },
84
85 'SiteLookup' => function ( MediaWikiServices $services ) {
86 $cacheFile = $services->getMainConfig()->get( 'SitesCacheFile' );
87
88 if ( $cacheFile !== false ) {
89 return new FileBasedSiteLookup( $cacheFile );
90 } else {
91 // Use the default SiteStore as the SiteLookup implementation for now
92 return $services->getSiteStore();
93 }
94 },
95
96 'ConfigFactory' => function ( MediaWikiServices $services ) {
97 // Use the bootstrap config to initialize the ConfigFactory.
98 $registry = $services->getBootstrapConfig()->get( 'ConfigRegistry' );
99 $factory = new ConfigFactory();
100
101 foreach ( $registry as $name => $callback ) {
102 $factory->register( $name, $callback );
103 }
104 return $factory;
105 },
106
107 'MainConfig' => function ( MediaWikiServices $services ) {
108 // Use the 'main' config from the ConfigFactory service.
109 return $services->getConfigFactory()->makeConfig( 'main' );
110 },
111
112 'InterwikiLookup' => function ( MediaWikiServices $services ) {
113 global $wgContLang; // TODO: manage $wgContLang as a service
114 $config = $services->getMainConfig();
115 return new ClassicInterwikiLookup(
117 $services->getMainWANObjectCache(),
118 $config->get( 'InterwikiExpiry' ),
119 $config->get( 'InterwikiCache' ),
120 $config->get( 'InterwikiScopes' ),
121 $config->get( 'InterwikiFallbackSite' )
122 );
123 },
124
125 'StatsdDataFactory' => function ( MediaWikiServices $services ) {
127 rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ), '.' )
128 );
129 },
130
131 'EventRelayerGroup' => function ( MediaWikiServices $services ) {
132 return new EventRelayerGroup( $services->getMainConfig()->get( 'EventRelayerConfig' ) );
133 },
134
135 'SearchEngineFactory' => function ( MediaWikiServices $services ) {
136 return new SearchEngineFactory( $services->getSearchEngineConfig() );
137 },
138
139 'SearchEngineConfig' => function ( MediaWikiServices $services ) {
140 global $wgContLang;
141 return new SearchEngineConfig( $services->getMainConfig(), $wgContLang );
142 },
143
144 'SkinFactory' => function ( MediaWikiServices $services ) {
145 $factory = new SkinFactory();
146
147 $names = $services->getMainConfig()->get( 'ValidSkinNames' );
148
149 foreach ( $names as $name => $skin ) {
150 $factory->register( $name, $skin, function () use ( $name, $skin ) {
151 $class = "Skin$skin";
152 return new $class( $name );
153 } );
154 }
155 // Register a hidden "fallback" skin
156 $factory->register( 'fallback', 'Fallback', function () {
157 return new SkinFallback;
158 } );
159 // Register a hidden skin for api output
160 $factory->register( 'apioutput', 'ApiOutput', function () {
161 return new SkinApi;
162 } );
163
164 return $factory;
165 },
166
167 'WatchedItemStore' => function ( MediaWikiServices $services ) {
168 $store = new WatchedItemStore(
169 $services->getDBLoadBalancer(),
170 new HashBagOStuff( [ 'maxKeys' => 100 ] ),
171 $services->getReadOnlyMode(),
172 $services->getMainConfig()->get( 'UpdateRowsPerQuery' )
173 );
174 $store->setStatsdDataFactory( $services->getStatsdDataFactory() );
175
176 if ( $services->getMainConfig()->get( 'ReadOnlyWatchedItemStore' ) ) {
177 $store = new NoWriteWatchedItemStore( $store );
178 }
179
180 return $store;
181 },
182
183 'WatchedItemQueryService' => function ( MediaWikiServices $services ) {
184 return new WatchedItemQueryService(
185 $services->getDBLoadBalancer(),
186 $services->getCommentStore(),
187 $services->getActorMigration()
188 );
189 },
190
191 'CryptRand' => function ( MediaWikiServices $services ) {
192 $secretKey = $services->getMainConfig()->get( 'SecretKey' );
193 return new CryptRand(
194 [
195 // To try vary the system information of the state a bit more
196 // by including the system's hostname into the state
197 'wfHostname',
198 // It's mostly worthless but throw the wiki's id into the data
199 // for a little more variance
200 'wfWikiID',
201 // If we have a secret key set then throw it into the state as well
202 function () use ( $secretKey ) {
203 return $secretKey ?: '';
204 }
205 ],
206 // The config file is likely the most often edited file we know should
207 // be around so include its stat info into the state.
208 // The constant with its location will almost always be defined, as
209 // WebStart.php defines MW_CONFIG_FILE to $IP/LocalSettings.php unless
210 // being configured with MW_CONFIG_CALLBACK (e.g. the installer).
211 defined( 'MW_CONFIG_FILE' ) ? [ MW_CONFIG_FILE ] : [],
212 LoggerFactory::getInstance( 'CryptRand' )
213 );
214 },
215
216 'CryptHKDF' => function ( MediaWikiServices $services ) {
217 $config = $services->getMainConfig();
218
219 $secret = $config->get( 'HKDFSecret' ) ?: $config->get( 'SecretKey' );
220 if ( !$secret ) {
221 throw new RuntimeException( "Cannot use MWCryptHKDF without a secret." );
222 }
223
224 // In HKDF, the context can be known to the attacker, but this will
225 // keep simultaneous runs from producing the same output.
226 $context = [ microtime(), getmypid(), gethostname() ];
227
228 // Setup salt cache. Use APC, or fallback to the main cache if it isn't setup
229 $cache = $services->getLocalServerObjectCache();
230 if ( $cache instanceof EmptyBagOStuff ) {
232 }
233
234 return new CryptHKDF( $secret, $config->get( 'HKDFAlgorithm' ),
235 $cache, $context, $services->getCryptRand()
236 );
237 },
238
239 'MediaHandlerFactory' => function ( MediaWikiServices $services ) {
240 return new MediaHandlerFactory(
241 $services->getMainConfig()->get( 'MediaHandlers' )
242 );
243 },
244
245 'MimeAnalyzer' => function ( MediaWikiServices $services ) {
246 $logger = LoggerFactory::getInstance( 'Mime' );
247 $mainConfig = $services->getMainConfig();
248 $params = [
249 'typeFile' => $mainConfig->get( 'MimeTypeFile' ),
250 'infoFile' => $mainConfig->get( 'MimeInfoFile' ),
251 'xmlTypes' => $mainConfig->get( 'XMLMimeTypes' ),
252 'guessCallback' =>
253 function ( $mimeAnalyzer, &$head, &$tail, $file, &$mime ) use ( $logger ) {
254 // Also test DjVu
255 $deja = new DjVuImage( $file );
256 if ( $deja->isValid() ) {
257 $logger->info( __METHOD__ . ": detected $file as image/vnd.djvu\n" );
258 $mime = 'image/vnd.djvu';
259
260 return;
261 }
262 // Some strings by reference for performance - assuming well-behaved hooks
264 'MimeMagicGuessFromContent',
265 [ $mimeAnalyzer, &$head, &$tail, $file, &$mime ]
266 );
267 },
268 'extCallback' => function ( $mimeAnalyzer, $ext, &$mime ) {
269 // Media handling extensions can improve the MIME detected
270 Hooks::run( 'MimeMagicImproveFromExtension', [ $mimeAnalyzer, $ext, &$mime ] );
271 },
272 'initCallback' => function ( $mimeAnalyzer ) {
273 // Allow media handling extensions adding MIME-types and MIME-info
274 Hooks::run( 'MimeMagicInit', [ $mimeAnalyzer ] );
275 },
276 'logger' => $logger
277 ];
278
279 if ( $params['infoFile'] === 'includes/mime.info' ) {
280 $params['infoFile'] = __DIR__ . "/libs/mime/mime.info";
281 }
282
283 if ( $params['typeFile'] === 'includes/mime.types' ) {
284 $params['typeFile'] = __DIR__ . "/libs/mime/mime.types";
285 }
286
287 $detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
288 if ( $detectorCmd ) {
289 $factory = $services->getShellCommandFactory();
290 $params['detectCallback'] = function ( $file ) use ( $detectorCmd, $factory ) {
291 $result = $factory->create()
292 // $wgMimeDetectorCommand can contain commands with parameters
293 ->unsafeParams( $detectorCmd )
294 ->params( $file )
295 ->execute();
296 return $result->getStdout();
297 };
298 }
299
300 // XXX: MimeMagic::singleton currently requires this service to return an instance of MimeMagic
301 return new MimeMagic( $params );
302 },
303
304 'ProxyLookup' => function ( MediaWikiServices $services ) {
305 $mainConfig = $services->getMainConfig();
306 return new ProxyLookup(
307 $mainConfig->get( 'SquidServers' ),
308 $mainConfig->get( 'SquidServersNoPurge' )
309 );
310 },
311
312 'Parser' => function ( MediaWikiServices $services ) {
313 $conf = $services->getMainConfig()->get( 'ParserConf' );
314 return ObjectFactory::constructClassInstance( $conf['class'], [ $conf ] );
315 },
316
317 'ParserCache' => function ( MediaWikiServices $services ) {
318 $config = $services->getMainConfig();
319 $cache = ObjectCache::getInstance( $config->get( 'ParserCacheType' ) );
320 wfDebugLog( 'caches', 'parser: ' . get_class( $cache ) );
321
322 return new ParserCache(
323 $cache,
324 $config->get( 'CacheEpoch' )
325 );
326 },
327
328 'LinkCache' => function ( MediaWikiServices $services ) {
329 return new LinkCache(
330 $services->getTitleFormatter(),
331 $services->getMainWANObjectCache()
332 );
333 },
334
335 'LinkRendererFactory' => function ( MediaWikiServices $services ) {
336 return new LinkRendererFactory(
337 $services->getTitleFormatter(),
338 $services->getLinkCache()
339 );
340 },
341
342 'LinkRenderer' => function ( MediaWikiServices $services ) {
343 global $wgUser;
344
345 if ( defined( 'MW_NO_SESSION' ) ) {
346 return $services->getLinkRendererFactory()->create();
347 } else {
348 return $services->getLinkRendererFactory()->createForUser( $wgUser );
349 }
350 },
351
352 'GenderCache' => function ( MediaWikiServices $services ) {
353 return new GenderCache();
354 },
355
356 '_MediaWikiTitleCodec' => function ( MediaWikiServices $services ) {
357 global $wgContLang;
358
359 return new MediaWikiTitleCodec(
361 $services->getGenderCache(),
362 $services->getMainConfig()->get( 'LocalInterwikis' )
363 );
364 },
365
366 'TitleFormatter' => function ( MediaWikiServices $services ) {
367 return $services->getService( '_MediaWikiTitleCodec' );
368 },
369
370 'TitleParser' => function ( MediaWikiServices $services ) {
371 return $services->getService( '_MediaWikiTitleCodec' );
372 },
373
374 'MainObjectStash' => function ( MediaWikiServices $services ) {
375 $mainConfig = $services->getMainConfig();
376
377 $id = $mainConfig->get( 'MainStash' );
378 if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) {
379 throw new UnexpectedValueException(
380 "Cache type \"$id\" is not present in \$wgObjectCaches." );
381 }
382
383 return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
384 },
385
386 'MainWANObjectCache' => function ( MediaWikiServices $services ) {
387 $mainConfig = $services->getMainConfig();
388
389 $id = $mainConfig->get( 'MainWANCache' );
390 if ( !isset( $mainConfig->get( 'WANObjectCaches' )[$id] ) ) {
391 throw new UnexpectedValueException(
392 "WAN cache type \"$id\" is not present in \$wgWANObjectCaches." );
393 }
394
395 $params = $mainConfig->get( 'WANObjectCaches' )[$id];
396 $objectCacheId = $params['cacheId'];
397 if ( !isset( $mainConfig->get( 'ObjectCaches' )[$objectCacheId] ) ) {
398 throw new UnexpectedValueException(
399 "Cache type \"$objectCacheId\" is not present in \$wgObjectCaches." );
400 }
401 $params['store'] = $mainConfig->get( 'ObjectCaches' )[$objectCacheId];
402
403 return \ObjectCache::newWANCacheFromParams( $params );
404 },
405
406 'LocalServerObjectCache' => function ( MediaWikiServices $services ) {
407 $mainConfig = $services->getMainConfig();
408
409 if ( function_exists( 'apc_fetch' ) ) {
410 $id = 'apc';
411 } elseif ( function_exists( 'apcu_fetch' ) ) {
412 $id = 'apcu';
413 } elseif ( function_exists( 'wincache_ucache_get' ) ) {
414 $id = 'wincache';
415 } else {
416 $id = CACHE_NONE;
417 }
418
419 if ( !isset( $mainConfig->get( 'ObjectCaches' )[$id] ) ) {
420 throw new UnexpectedValueException(
421 "Cache type \"$id\" is not present in \$wgObjectCaches." );
422 }
423
424 return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
425 },
426
427 'VirtualRESTServiceClient' => function ( MediaWikiServices $services ) {
428 $config = $services->getMainConfig()->get( 'VirtualRestConfig' );
429
430 $vrsClient = new VirtualRESTServiceClient( new MultiHttpClient( [] ) );
431 foreach ( $config['paths'] as $prefix => $serviceConfig ) {
432 $class = $serviceConfig['class'];
433 // Merge in the global defaults
434 $constructArg = isset( $serviceConfig['options'] )
435 ? $serviceConfig['options']
436 : [];
437 $constructArg += $config['global'];
438 // Make the VRS service available at the mount point
439 $vrsClient->mount( $prefix, [ 'class' => $class, 'config' => $constructArg ] );
440 }
441
442 return $vrsClient;
443 },
444
445 'ConfiguredReadOnlyMode' => function ( MediaWikiServices $services ) {
446 return new ConfiguredReadOnlyMode( $services->getMainConfig() );
447 },
448
449 'ReadOnlyMode' => function ( MediaWikiServices $services ) {
450 return new ReadOnlyMode(
451 $services->getConfiguredReadOnlyMode(),
452 $services->getDBLoadBalancer()
453 );
454 },
455
456 'UploadRevisionImporter' => function ( MediaWikiServices $services ) {
458 $services->getMainConfig()->get( 'EnableUploads' ),
459 LoggerFactory::getInstance( 'UploadRevisionImporter' )
460 );
461 },
462
463 'OldRevisionImporter' => function ( MediaWikiServices $services ) {
465 true,
466 LoggerFactory::getInstance( 'OldRevisionImporter' ),
467 $services->getDBLoadBalancer()
468 );
469 },
470
471 'WikiRevisionOldRevisionImporterNoUpdates' => function ( MediaWikiServices $services ) {
473 false,
474 LoggerFactory::getInstance( 'OldRevisionImporter' ),
475 $services->getDBLoadBalancer()
476 );
477 },
478
479 'ShellCommandFactory' => function ( MediaWikiServices $services ) {
480 $config = $services->getMainConfig();
481
482 $limits = [
483 'time' => $config->get( 'MaxShellTime' ),
484 'walltime' => $config->get( 'MaxShellWallClockTime' ),
485 'memory' => $config->get( 'MaxShellMemory' ),
486 'filesize' => $config->get( 'MaxShellFileSize' ),
487 ];
488 $cgroup = $config->get( 'ShellCgroup' );
489 $restrictionMethod = $config->get( 'ShellRestrictionMethod' );
490
491 $factory = new CommandFactory( $limits, $cgroup, $restrictionMethod );
492 $factory->setLogger( LoggerFactory::getInstance( 'exec' ) );
493 $factory->logStderr();
494
495 return $factory;
496 },
497
498 'ExternalStoreFactory' => function ( MediaWikiServices $services ) {
499 $config = $services->getMainConfig();
500
501 return new ExternalStoreFactory(
502 $config->get( 'ExternalStores' )
503 );
504 },
505
506 'RevisionStore' => function ( MediaWikiServices $services ) {
508 $blobStore = $services->getService( '_SqlBlobStore' );
509
510 $store = new RevisionStore(
511 $services->getDBLoadBalancer(),
512 $blobStore,
513 $services->getMainWANObjectCache(),
514 $services->getCommentStore(),
515 $services->getActorMigration()
516 );
517
518 $store->setLogger( LoggerFactory::getInstance( 'RevisionStore' ) );
519
520 $config = $services->getMainConfig();
521 $store->setContentHandlerUseDB( $config->get( 'ContentHandlerUseDB' ) );
522
523 return $store;
524 },
525
526 'RevisionLookup' => function ( MediaWikiServices $services ) {
527 return $services->getRevisionStore();
528 },
529
530 'RevisionFactory' => function ( MediaWikiServices $services ) {
531 return $services->getRevisionStore();
532 },
533
534 'BlobStoreFactory' => function ( MediaWikiServices $services ) {
535 global $wgContLang;
536 return new BlobStoreFactory(
537 $services->getDBLoadBalancer(),
538 $services->getMainWANObjectCache(),
539 $services->getMainConfig(),
541 );
542 },
543
544 'BlobStore' => function ( MediaWikiServices $services ) {
545 return $services->getService( '_SqlBlobStore' );
546 },
547
548 '_SqlBlobStore' => function ( MediaWikiServices $services ) {
549 return $services->getBlobStoreFactory()->newSqlBlobStore();
550 },
551
552 'ContentModelStore' => function ( MediaWikiServices $services ) {
553 return new NameTableStore(
554 $services->getDBLoadBalancer(),
555 $services->getMainWANObjectCache(),
556 LoggerFactory::getInstance( 'NameTableSqlStore' ),
557 'content_models',
558 'model_id',
559 'model_name'
566 );
567 },
568
569 'SlotRoleStore' => function ( MediaWikiServices $services ) {
570 return new NameTableStore(
571 $services->getDBLoadBalancer(),
572 $services->getMainWANObjectCache(),
573 LoggerFactory::getInstance( 'NameTableSqlStore' ),
574 'slot_roles',
575 'role_id',
576 'role_name',
577 'strtolower'
578 );
579 },
580
581 'PreferencesFactory' => function ( MediaWikiServices $services ) {
582 global $wgContLang;
583 $authManager = AuthManager::singleton();
584 $linkRenderer = $services->getLinkRendererFactory()->create();
585 $config = $services->getMainConfig();
586 $factory = new DefaultPreferencesFactory( $config, $wgContLang, $authManager, $linkRenderer );
587 $factory->setLogger( LoggerFactory::getInstance( 'preferences' ) );
588
589 return $factory;
590 },
591
592 'HttpRequestFactory' => function ( MediaWikiServices $services ) {
593 return new \MediaWiki\Http\HttpRequestFactory();
594 },
595
596 'CommentStore' => function ( MediaWikiServices $services ) {
597 global $wgContLang;
598 return new CommentStore(
600 $services->getMainConfig()->get( 'CommentTableSchemaMigrationStage' )
601 );
602 },
603
604 'ActorMigration' => function ( MediaWikiServices $services ) {
605 return new ActorMigration(
606 $services->getMainConfig()->get( 'ActorTableSchemaMigrationStage' )
607 );
608 },
609
611 // NOTE: When adding a service here, don't forget to add a getter function
612 // in the MediaWikiServices class. The convenience getter should just call
613 // $this->getService( 'FooBarService' ).
615
616];
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
wfGetCache( $cacheType)
Get a specific cache object.
wfIsHHVM()
Check if we are running under HHVM.
$wgUser
Definition Setup.php:902
This class handles the logic for the actor table migration.
A factory for application metric data.
CommentStore handles storage of comments (edit summaries, log reasons, etc) in the database.
Factory class to create Config objects.
A read-only mode service which does not depend on LoadBalancer.
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution et...
Definition DjVuImage.php:36
A BagOStuff object with no objects in it.
Factory class for spawning EventRelayer objects using configuration.
Provides a file-based cache of a SiteStore.
Caches user genders when needed to use correct namespace aliases.
Simple store for keeping values in an associative array for the current process.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition Hooks.php:203
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition LinkCache.php:34
static applyDefaultConfig(array $lbConf, Config $mainConfig, ConfiguredReadOnlyMode $readOnlyMode)
static getLBFactoryClass(array $config)
Returns the LBFactory class to use and the load balancer configuration.
static setSchemaAliases(LBFactory $lbFactory, Config $config)
Class to construct MediaHandler objects.
A codec for MediaWiki page titles.
This serves as the entry point to the authentication system.
InterwikiLookup implementing the "classic" interwiki storage (hardcoded up to MW 1....
Factory to create LinkRender objects.
PSR-3 logger instance factory.
MediaWikiServices is the service locator for the application scope of MediaWiki.
This is the default implementation of PreferencesFactory.
Factory facilitating dependency injection for Command.
Service for instantiating BlobStores.
Service for looking up page revisions.
Service for storing and loading Content objects.
Class to handle concurrent HTTP requests.
static getInstance( $id)
Get a cached instance of the specified type of cache object.
static getLocalClusterInstance()
Get the main cluster-local cache object.
A service class for fetching the wiki's current read-only mode.
Configuration handling class for SearchEngine.
Factory class for SearchEngine.
SkinTemplate class for API output.
Definition SkinApi.php:31
Factory class to create Skin objects.
SkinTemplate class for the fallback skin.
Virtual HTTP service client loosely styled after a Virtual File System.
Storage layer class for WatchedItems.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
Definition design.txt:57
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2811
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services
Definition hooks.txt:2273
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
Definition hooks.txt:2056
const CACHE_NONE
Definition Defines.php:112
const CACHE_ANYTHING
Definition Defines.php:111
const CACHE_ACCEL
Definition Defines.php:115
$cache
Definition mcc.php:33
if( $ext=='php'|| $ext=='php5') $mime
Definition router.php:59
if(!is_readable( $file)) $ext
Definition router.php:55
$params