/** * Constructor * * @param string $from * @param string $to * * @param TransformerInterface $transformer optional transformer */ public function __construct($from, $to, TransformerInterface $transformer = null) { parent::__construct($from, $to); if ($transformer instanceof TransformerInterface) { $this->setTransformer($transformer); } }
/** * Constructor * * @param string $from * @param string $to * @param MapInterface $map * @param FactoryInterface $factory */ public function __construct($from, $to, MapInterface $map, FactoryInterface $factory) { parent::__construct($from, $to); $this->map = $map; $this->factory = $factory; }