public parse ( ) : Yosymfony\Spress\Core\DataSource\ItemInterface[] | ||
return | Yosymfony\Spress\Core\DataSource\ItemInterface[] | Items of the site |
public function parse()
{
$attributes = $this['spress.config.values'];
$spressAttributes = $this->getSpressAttributes();
$result = $this['spress.cms.contentManager']->parseSite($attributes, $spressAttributes, $attributes['drafts'], $attributes['safe'], $attributes['timezone']);
return $result;
}
public function testReParseSite() { $dw = new MemoryDataWriter(); $spress = new Spress(); $spress['spress.config.site_dir'] = __DIR__ . '/fixtures/project'; $spress['spress.dataWriter'] = $dw; $spress->parse(); $this->assertCount(17, $dw->getItems()); $spress->parse(); $this->assertCount(17, $dw->getItems()); }