コード例 #1
0
 function __construct($lang)
 {
     parent::__construct();
     $this->dict = new SpellCheckerDictionary($lang);
     $this->lang = $lang;
     // add extra words for this session only
     $this->addExtraWords();
 }
コード例 #2
0
 function __construct($htmlParser = null)
 {
     if ($htmlParser == null) {
         $htmlParser = new Wikia\JsonFormat\HtmlParser();
     }
     $this->requestContext = new RequestContext();
     $this->htmlParser = $htmlParser;
     parent::__construct();
 }
コード例 #3
0
 function __construct()
 {
     parent::__construct();
     if (!self::$initialized) {
         //singleton
         F::setInstance(__CLASS__, $this);
         self::$initialized = true;
     }
 }
コード例 #4
0
 /**
  * Constructor
  *
  * @param string $prefix form name
  * @param array $fields  array of form fields ( @see setFields )
  */
 public function __construct($prefix = '', $fields = [])
 {
     parent::__construct();
     if (!empty($prefix)) {
         $this->prefix = $prefix;
     }
     if (!empty($fields)) {
         $this->setFields($fields);
     }
 }
コード例 #5
0
 public function __construct($cityId)
 {
     global $wgForeignFileRepos;
     parent::__construct();
     $this->cityId = $cityId;
     $this->skinName = RequestContext::getMain()->getSkin()->getSkinName();
     $hubWiki = WikiFactory::getWikiByID($cityId);
     $hubDbName = $hubWiki->city_dbname;
     $wgForeignFileRepos[] = ['class' => 'WikiaForeignDBViaLBRepo', 'name' => $hubDbName, 'transformVia404' => true, 'wiki' => $hubDbName, 'backend' => "wikia{$hubDbName}-backend"];
 }
コード例 #6
0
 public function __construct($articleId = 0)
 {
     parent::__construct();
     $this->setArticleById($articleId);
 }