symfonyを使い始めるとサービスに問題が発生しました。symfonyサービスの実行に問題があります
... \アプリ\ CONFIG \ services.yml
app.pdf.service:
class: AppBundle\Service\PdfService
arguments: [format, orientation]]
... \ SRC \ AppBundle \サービス\ PdfService.php
namespace AppBundle\Service;
class PdfService
{
private $format;
private $orientation;
public function __construct($format, $orientation)
{
$this->format = $format;
$this->orientation = $orientation;
}
}
そして今、私は、サービスを利用しようwith:
$this->container->get('app.pdf.service');
私は何かを忘れましたか? $ this-> container-> get(ist working、whiteoctober/tcpdf-bundleからtcpdf/serviceを呼び出したので、このサービスを拡張します。 s00n N00N
エラーが表示されましたか? – mblaettermann
'引数:[format、orientation]] - >余分な括弧'] '?? – yceruto
thxですが、コピー&ペーストの間違いでした。私のIDEでは、2番目のブラケットはセットされていませんでした。 – n00n