convertItem() 공개 메소드

Converts an item. This method uses the SNAPSHOT_PATH_RELATIVE of Item path.
public convertItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) : Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult
$item Yosymfony\Spress\Core\DataSource\ItemInterface The item
리턴 Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult
예제 #1
0
 public function testConvertItemNoTextExtension()
 {
     $cm = new ConverterManager(['html']);
     $cm->addConverter(new MapConverter());
     $item = new Item('text', 'file.unknow');
     $item->setPath('file.unknow', Item::SNAPSHOT_PATH_RELATIVE);
     $result = $cm->convertItem($item);
     $this->assertEquals('text', $result->getResult());
     $this->assertEquals('unknow', $result->getExtension());
 }