Skip to content

Commit

Permalink
- 3.0
Browse files Browse the repository at this point in the history
- Updated readme
  • Loading branch information
Machy8 committed Aug 20, 2017
1 parent 85d2e79 commit 3c76747
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,40 @@ $compiled = $macdom->compile($content);
```

*Nette framework:*
- Soon, but first, let me take a selfie
```PHP

use Macdom\Engine;
use Macdom\Bridges\MacdomLatte\MacdomLoader;

/**
* @var Engine
*/
private $macdom;

/**
* @var MacdomLoader
*/
private $macdom;

public function __construct(Macdom\Engine $macdom, MacdomLoader $macdomLoader) {
$this->macdom = $macdom;
$this->macdomLoader = $macdom;
}

protected function createTemplate()
{
$template = parent::createTemplate();
$this->macdomLoader->setMacdom($this->macdom);
$template->getLatte()->setLoader($this->macdomLoader);
return $template;
}
```

And in the config neon
```
extensions:
macdom: Macdom\Bridges\MacdomNette\MacdomExtension
macdom:
debugger: TRUE
```

0 comments on commit 3c76747

Please sign in to comment.