Yosymfony\Spress\Core\DataSource\Item::setPath PHP Метод

setPath() публичный Метод

public setPath ( $value, $snapshotName )
    public function setPath($value, $snapshotName)
    {
        $this->pathSnapshot[$snapshotName] = $value;
        $this->pathSnapshot[self::SNAPSHOT_PATH_LAST] = $value;
    }

Usage Example

 public function testWriteItem()
 {
     $item = new Item('Test content', 'my-id');
     $item->setPath('index.html', Item::SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT);
     $item->setPath('index.html', Item::SNAPSHOT_PATH_PERMALINK);
     $dw = new FilesystemDataWriter(new Filesystem(), $this->tmpDir);
     $dw->write($item);
     $this->assertFileExists($this->tmpDir . '/index.html');
 }
All Usage Examples Of Yosymfony\Spress\Core\DataSource\Item::setPath