示例#1
0
 /**
  * @note It is performance critical to make sure that the instance is only
  * invoked once per request
  *
  * @since 2.2
  *
  * @return PpropertyTableInfoFetcher
  */
 public function getPropertyTableInfoFetcher()
 {
     if ($this->propertyTableInfoFetcher === null) {
         $this->propertyTableInfoFetcher = new PropertyTableInfoFetcher();
         $this->propertyTableInfoFetcher->setCustomFixedPropertyList(self::$configuration->get('smwgFixedProperties'));
         $this->propertyTableInfoFetcher->setCustomSpecialPropertyList(self::$configuration->get('smwgPageSpecialProperties'));
     }
     return $this->propertyTableInfoFetcher;
 }
 /**
  * @since 2.3
  *
  * @return PropertyTableInfoFetcher
  */
 public function newPropertyTableInfoFetcher()
 {
     $propertyTableInfoFetcher = new PropertyTableInfoFetcher();
     $propertyTableInfoFetcher->setCustomFixedPropertyList($this->settings->get('smwgFixedProperties'));
     $propertyTableInfoFetcher->setCustomSpecialPropertyList($this->settings->get('smwgPageSpecialProperties'));
     return $propertyTableInfoFetcher;
 }
 /**
  * @dataProvider dataTypeProvider
  */
 public function testFindTableIdForDataTypeTypeId($dataType, $expected)
 {
     $instance = new PropertyTableInfoFetcher();
     $instance->setCustomSpecialPropertyList(array('_MDAT', '_MEDIA', '_MIME'));
     $this->assertEquals($expected, $instance->findTableIdForDataTypeTypeId($dataType));
 }