コード例 #1
0
 /**
  * Get an object of the dataitem handler from the dataitem provided.
  *
  * @since 1.8
  * @param integer $diType
  *
  * @return SMWDIHandler
  * @throws RuntimeException if no handler exists for the given type
  */
 public function getDataItemHandlerForDIType($diType)
 {
     if ($this->dataItemHandlerDispatcher === null) {
         $this->dataItemHandlerDispatcher = $this->factory->newDataItemHandlerDispatcher($this);
     }
     return $this->dataItemHandlerDispatcher->getHandlerByType($diType);
 }
コード例 #2
0
 public function testCanConstructDataItemHandlerDispatcher()
 {
     $instance = new SQLStoreFactory($this->store);
     $this->assertInstanceOf('SMW\\SQLStore\\EntityStore\\DataItemHandlerDispatcher', $instance->newDataItemHandlerDispatcher());
 }