r52778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52777‎ | r52778 | r52779 >
Date:21:00, 5 July 2009
Author:ialex
Status:deferred
Tags:
Comment:
Fix a bunch of E_PARSE
Modified paths:
  • /trunk/extensions/RdfRedland/Vocabularies/CreativeCommons.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabularies/DCMiType.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabularies/DCTerms.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabularies/DCmes.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabularies/Rdf.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabularies/RdfSchema.php (modified) (history)
  • /trunk/extensions/RdfRedland/Vocabulary.php (modified) (history)
  • /trunk/extensions/RdfRedland/test/MwRdfTest_Vocabulary.php (modified) (history)
  • /trunk/extensions/RdfRedland/test/includes/Namespace.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RdfRedland/test/includes/Namespace.php
@@ -24,7 +24,7 @@
2525 * @subpackage Extensions
2626 */
2727
28 -class Namespace {
 28+class MWNamespace {
2929
3030 public static function isTalk( $namespace ) {
3131 switch ( $namespace ) {
Index: trunk/extensions/RdfRedland/test/MwRdfTest_Vocabulary.php
@@ -30,33 +30,33 @@
3131
3232 public function testNamespaceInheritance() {
3333 $ns = 'http://example.com/test/';
34 - $this->assertEquals( $ns, TestVocabularyClass::NAMESPACE );
 34+ $this->assertEquals( $ns, TestVocabularyClass::RDF_NAMESPACE );
3535 $this->assertEquals( $ns, TestVocabularyClass::getNS() );
3636
3737 $ns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
38 - $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::NAMESPACE );
 38+ $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::RDF_NAMESPACE );
3939 $this->assertEquals( $ns, MwRdf_Vocabulary_Rdf::getNS() );
4040
4141 $ns = "http://www.w3.org/2000/01/rdf-schema#";
42 - $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::NAMESPACE );
 42+ $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::RDF_NAMESPACE );
4343 $this->assertEquals( $ns, MwRdf_Vocabulary_RdfSchema::getNS() );
4444
4545 $ns = 'http://web.resource.org/cc/';
46 - $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::NAMESPACE );
 46+ $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::RDF_NAMESPACE );
4747 $this->assertEquals( $ns, MwRdf_Vocabulary_CreativeCommons::getNS() );
4848
4949 $ns = "http://purl.org/dc/elements/1.1/";
50 - $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::NAMESPACE );
 50+ $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::RDF_NAMESPACE );
5151 $this->assertEquals( $ns, MwRdf_Vocabulary_DCMES::getNS() );
5252 }
5353 }
5454
5555 class TestVocabularyClass extends MwRdf_Vocabulary {
5656
57 - const NAMESPACE = 'http://example.com/test/';
 57+ const RDF_NAMESPACE = 'http://example.com/test/';
5858
5959 public function getNS() {
60 - return self::NAMESPACE;
 60+ return self::RDF_NAMESPACE;
6161 }
6262
6363 public $Right;
Index: trunk/extensions/RdfRedland/Vocabularies/DCmes.php
@@ -27,10 +27,10 @@
2828 class MwRdf_Vocabulary_DCMES extends MwRdf_Vocabulary {
2929
3030 // base uri
31 - const NAMESPACE = "http://purl.org/dc/elements/1.1/"; // FIXME
 31+ const RDF_NAMESPACE = "http://purl.org/dc/elements/1.1/"; // FIXME
3232
3333 public function getNS() {
34 - return self::NAMESPACE;
 34+ return self::RDF_NAMESPACE;
3535 }
3636
3737 // Terms
Index: trunk/extensions/RdfRedland/Vocabularies/Rdf.php
@@ -26,8 +26,8 @@
2727 class MwRdf_Vocabulary_Rdf extends MwRdf_Vocabulary {
2828
2929 //base uri
30 - const NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
31 - public function getNS() { return self::NAMESPACE; }
 30+ const RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
 31+ public function getNS() { return self::RDF_NAMESPACE; }
3232
3333 // Terms
3434 public $Alt;
Index: trunk/extensions/RdfRedland/Vocabularies/RdfSchema.php
@@ -27,8 +27,8 @@
2828 class MwRdf_Vocabulary_RdfSchema extends MwRdf_Vocabulary {
2929
3030 //base uri
31 - const NAMESPACE = "http://www.w3.org/2000/01/rdf-schema#";
32 - public function getNS() { return self::NAMESPACE; }
 31+ const RDF_NAMESPACE = "http://www.w3.org/2000/01/rdf-schema#";
 32+ public function getNS() { return self::RDF_NAMESPACE; }
3333
3434 // Terms
3535 public $Resource;
Index: trunk/extensions/RdfRedland/Vocabularies/CreativeCommons.php
@@ -34,10 +34,10 @@
3535 class MwRdf_Vocabulary_CreativeCommons extends MwRdf_Vocabulary {
3636
3737 // base uri
38 - const NAMESPACE = "http://web.resource.org/cc/";
 38+ const RDF_NAMESPACE = "http://web.resource.org/cc/";
3939
4040 public function getNS() {
41 - return self::NAMESPACE;
 41+ return self::RDF_NAMESPACE;
4242 }
4343
4444 // Terms
Index: trunk/extensions/RdfRedland/Vocabularies/DCMiType.php
@@ -26,10 +26,10 @@
2727
2828 class MwRdf_Vocabulary_DCMiType extends MwRdf_Vocabulary {
2929
30 - const NAMESPACE = "http://purl.org/dc/dcmitype/";
 30+ const RDF_NAMESPACE = "http://purl.org/dc/dcmitype/";
3131
3232 public function getNS() {
33 - return self::NAMESPACE;
 33+ return self::RDF_NAMESPACE;
3434 }
3535
3636 public $Collection;
Index: trunk/extensions/RdfRedland/Vocabularies/DCTerms.php
@@ -26,8 +26,8 @@
2727
2828 class MwRdf_Vocabulary_DCTerms extends MwRdf_Vocabulary {
2929
30 - const NAMESPACE = "http://purl.org/dc/terms/";
31 - public function getNS() { return self::NAMESPACE; }
 30+ const RDF_NAMESPACE = "http://purl.org/dc/terms/";
 31+ public function getNS() { return self::RDF_NAMESPACE; }
3232
3333 public $abstract;
3434 public $accessRights;
Index: trunk/extensions/RdfRedland/Vocabulary.php
@@ -27,16 +27,16 @@
2828 /*
2929 * A (mostly) abstract class which provides a little syntactic sugar
3030 * for defining vocabularies. To define a vocabulary using this
31 - * interface simply declare a base URI as the constant NAMESPACE, then
 31+ * interface simply declare a base URI as the constant RDF_NAMESPACE, then
3232 * add terms for each of the vocabulary's terms. Just make sure that
3333 * the term name exactly matches the term text.
3434 */
3535 abstract class MwRdf_Vocabulary {
3636
37 - const NAMESPACE = '';
 37+ const RDF_NAMESPACE = '';
3838
3939 public function getNS() {
40 - self::NAMESPACE;
 40+ self::RDF_NAMESPACE;
4141 }
4242
4343 public function __construct() {

Status & tagging log