summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php93
1 files changed, 93 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php
new file mode 100644
index 00000000..5bc84de0
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialPage.php
@@ -0,0 +1,93 @@
+<?php
+
+namespace SMW;
+
+/**
+ * Semantic MediaWiki SpecialPage base class
+ *
+ *
+ * @license GNU GPL v2+
+ * @since 1.9
+ *
+ * @author mwjames
+ */
+
+/**
+ * Semantic MediaWiki SpecialPage base class
+ *
+ * @ingroup SpecialPage
+ * @codeCoverageIgnore
+ */
+class SpecialPage extends \SpecialPage {
+
+ /** @var Store */
+ protected $store = null;
+
+ /** @var Settings */
+ protected $settings = null;
+
+ /**
+ * @see SpecialPage::__construct
+ *
+ * @since 1.9
+ *
+ * @param $name
+ * @param $restriction
+ */
+ public function __construct( $name = '', $restriction = '' ) {
+ parent::__construct( $name, $restriction );
+ $this->store = StoreFactory::getStore();
+ }
+
+ /**
+ * Sets store instance
+ *
+ * @since 1.9
+ *
+ * @param Store $store
+ */
+ public function setStore( Store $store ) {
+ $this->store = $store;
+ return $this;
+ }
+
+ /**
+ * Returns store object
+ *
+ * @since 1.9
+ *
+ * @return Store
+ */
+ public function getStore() {
+ return $this->store;
+ }
+
+ /**
+ * Sets Settings object
+ *
+ * @since 1.9
+ *
+ * @param Settings $settings
+ */
+ public function setSettings( Settings $settings ) {
+ $this->settings = $settings;
+ return $this;
+ }
+
+ /**
+ * Returns Settings object
+ *
+ * @since 1.9
+ *
+ * @return Store
+ */
+ public function getSettings() {
+
+ if ( $this->settings === null ) {
+ $this->settings = Settings::newFromGlobals();
+ }
+
+ return $this->settings;
+ }
+
+}