About: Nirvana/Quick Start Guide   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : dbkwik.org associated with source dataset(s)

WikiaSuperFactory (F::) and WikiaApp ($app) map MediaWiki coding practices to a set of helper objects and variables. The original intent was to make our code more unit testable by going through a layer of indirection before accessing any mediawiki global variable or function. Additionally, the unit test framework we were using did not allow us to mock classes that were constructed inside of a method instead of being passed in. After additional work, we switched to using the PHP extension runkit, which is a bit of a hack but allows us to test all the legacy code we have. After that, we removed the F::build() factory. WikiaApp still has some useful helper functions, and controllers still have the $this->wg attribute.

AttributesValues
rdfs:label
  • Nirvana/Quick Start Guide
rdfs:comment
  • WikiaSuperFactory (F::) and WikiaApp ($app) map MediaWiki coding practices to a set of helper objects and variables. The original intent was to make our code more unit testable by going through a layer of indirection before accessing any mediawiki global variable or function. Additionally, the unit test framework we were using did not allow us to mock classes that were constructed inside of a method instead of being passed in. After additional work, we switched to using the PHP extension runkit, which is a bit of a hack but allows us to test all the legacy code we have. After that, we removed the F::build() factory. WikiaApp still has some useful helper functions, and controllers still have the $this->wg attribute.
dcterms:subject
abstract
  • WikiaSuperFactory (F::) and WikiaApp ($app) map MediaWiki coding practices to a set of helper objects and variables. The original intent was to make our code more unit testable by going through a layer of indirection before accessing any mediawiki global variable or function. Additionally, the unit test framework we were using did not allow us to mock classes that were constructed inside of a method instead of being passed in. After additional work, we switched to using the PHP extension runkit, which is a bit of a hack but allows us to test all the legacy code we have. After that, we removed the F::build() factory. WikiaApp still has some useful helper functions, and controllers still have the $this->wg attribute. In a controller Object we add the $app and $wg helpers as class vars so the calling convention looks like this: $this->wg->memc->get('key'); $text = wfMessage('nirvana-is-awesome')->text(); In a template (View Object) we have added the $app $wg helpers to the template namespace itself, so the calling convention looks like this: text() ?>
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software