protected function __construct() { global $wgDBtype; global $wgPieceOfCodeConfig; $this->_errors = POCErrorsHolder::Instance(); $this->_flags = POCFlags::Instance(); $this->_dbtype = $wgDBtype; if ($wgPieceOfCodeConfig['history']) { $this->createTable(); } }
/** * @todo doc */ protected function upRevision() { if (!$this->isLatestVersion()) { switch ($this->getVersion()) { case '0.2': $this->upToVersion0_2_rev(); break; default: echo '<h1>' . $this->getVersion() . '</h1>'; } $aux = explode(' ', PieceOfCode::Property('svn-revision')); if ($this->_flags->set('POC_LATEST_REVISION', $aux[1], 'I')) { die(__FILE__ . ':' . __LINE__); } } }
public function __construct() { parent::__construct('PieceOfCode'); /* * Checking and updating version. */ $this->_versionManager = POCVersionManager::Instance(); /* * Setting tag-kooks. */ if (defined('MEDIAWIKI')) { global $wgParser; $wgParser->setHook('pieceofcode', array(&$this, 'parse')); } $this->_errors = POCErrorsHolder::Instance(); $this->_flags = POCFlags::Instance(); $this->_history = POCHistoryManager::Instance(); $this->_svnConnections = POCSVNConnections::Instance(); $this->_storedCodes = POCStoredCodes::Instance(); $this->_stats = POCStats::Instance(); $this->_errors->clearError(); }
/** * @return Returns the singleton instance of this class POCFlags. */ public static function Instance() { if (!isset(self::$_Instance)) { $c = __CLASS__; self::$_Instance = new $c(); } return self::$_Instance; }