| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
🔧 Robots generator component
This componenet automaticaly generates robots from parameters in configuration.
services:
robotsFactory:
implement: Nepttune\Component\IRobotsFactory
arguments:
- '%robots%'
parameters:
robots:
all:
name: '*'
disallow:
google:
name 'GoogleBot'
disallow:
- '/example'
- '/example2'
class ExamplePresenter implements IPresenter
{
/** @var \Nepttune\Component\IRobotsFactory */
protected $iRobotsFactory;
public function __construct(\Nepttune\Component\IRobotsFactory $IRobotsFactory)
{
$this->iRobotsFactory = $IRobotsFactory;
}
protected function createComponentRobots() : \Nepttune\Component\Robots
{
return $this->iRobotsFactory->create();
}
}
| Back | FazBrowse Home | New Git URL |