User "Reedy" changed the status of MediaWiki.r98405. Old Status: new New Status: fixme
User "Reedy" also posted a comment on MediaWiki.r98405. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98405#c23870 Commit summary: HTMLFileCache refactoring: * Rewrote class and split into three classes: a base class, and html cache and a more generic cache to be used later. * The new classes now use RequestContext. * Renamed fetchPageText() -> fetchText(). * Split out new saveText() function from saveToFileCache(). * Various other cleanups and fixes. Also fixed backwards setting of $wgDisableCounters in rebuildFileCache.php. Comment: <pre> public static function newFromKey( $key, $type ) { $cache = new self(); $cache->mKey = (string)$key; $cache->mType = (string)$type; $cache->mExt = 'cache'; return $cache; } </pre> new self(); in an abstract class isn't valid: <pre> abstract class foo { static function create() { return new self(); } } class foo2 extends foo { } var_dump( foo::create() ); </pre> <pre> PHP Fatal error: Cannot instantiate abstract class foo in /home/reedy/test.php on line 5 PHP Stack trace: PHP 1. {main}() /home/reedy/test.php:0 PHP 2. foo::create() /home/reedy/test.php:13 </pre> <pre> abstract class foo { static function create() { return new self(); } } class foo2 extends foo { } var_dump( foo1::create() ); </pre> <pre> reedy@ubuntu64-web-esxi:~$ php test.php PHP Fatal error: Cannot instantiate abstract class foo in /home/reedy/test.php on line 5 PHP Stack trace: PHP 1. {main}() /home/reedy/test.php:0 PHP 2. foo::create() /home/reedy/test.php:13 </pre> _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
