From 556669e613a363d523f0f56fc671c4ace9ad974d Mon Sep 17 00:00:00 2001 From: Nicolas Alexandre Date: Tue, 1 Aug 2023 14:42:54 +0200 Subject: [PATCH] feat: add create agent function to set a custom logger --- src/Service/ForestAgent.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Service/ForestAgent.php b/src/Service/ForestAgent.php index 707c272..24a6286 100644 --- a/src/Service/ForestAgent.php +++ b/src/Service/ForestAgent.php @@ -31,6 +31,13 @@ public function __construct(private KernelInterface $appKernel, private EntityMa $this->loadConfiguration(); } + public function createAgent(array $options = []): self + { + $this->agent->createAgent($options); + + return $this; + } + public function addDatasource(DatasourceContract $datasource, array $options = []): self { $this->agent->addDatasource($datasource, $options); @@ -48,6 +55,8 @@ public function addChart(string $name, \Closure $definition): self public function use(string $plugin, array $options = []): self { $this->agent->use($plugin, $options); + + return $this; } public function build(): void