public function convertItem(ItemInterface $item)
    {
        $path = $item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE);
        $str = new StringWrapper($path);
        $extension = $str->getFirstEndMatch($this->textExtensions);

        if ($extension === '') {
            $extension = pathinfo($path, PATHINFO_EXTENSION);
        }

        return $this->convertContent($item->getContent(), $extension);
    }
public function convertItem(ItemInterface $item)
    {
        $path = $item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE);
        $str = new StringWrapper($path);
        $extension = $str->getFirstEndMatch($this->textExtensions);

        if ($extension === '') {
            $extension = pathinfo($path, PATHINFO_EXTENSION);
        }

        return $this->convertContent($item->getContent(), $extension);
    }
public function convertItem ( ItemInterface $ item ) { $ path = $ item -> getPath ( ItemInterface :: SNAPSHOT_PATH_RELATIVE ) ; $ str = new StringWrapper ( $ path ) ; $ extension = $ str -> getFirstEndMatch ( $ this -> textExtensions ) ; if ( $ extension === '' ) { $ extension = pathinfo ( $ path , PATHINFO_EXTENSION ) ; } return $ this -> convertContent ( $ item -> getContent ( ) , $ extension ) ; }
Converts an item. This method uses the SNAPSHOT_PATH_RELATIVE of Item path.

@param Yosymfony\Spress\Core\DataSource\ItemInterface $item The item

@return Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult

@throws RuntimeException If there's no converter for the extension passed
Converts an item . This method uses the SNAPSHOT_PATH_RELATIVE of Item path .