PHP code example of geniv / nette-autowired

1. Go to this page and download the library: Download geniv/nette-autowired library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

geniv / nette-autowired example snippets


class BasePresenter extends Presenter
{
    use AutowiredComponent;

protected function createComponentDatagrid(string $name, IDatagridFactory $factory): DatagridFactory
{
    return $factory->create();
}

protected function createComponentSomeone(Someone $someone): Someone
{
    return $someone;
}
json
"php": ">=7.0",
"nette/component-model": ">=2.3",
"nette/di": ">=2.4",
"nette/reflection": ">=2.4"