/** * Construct a new base64 codec. * * @param TransformInterface|null $encodeTransform The encode transform to use. * @param TransformInterface|null $decodeTransform The decode transform to use. */ public function __construct(TransformInterface $encodeTransform = null, TransformInterface $decodeTransform = null) { if (null === $encodeTransform) { $encodeTransform = Base64EncodeTransform::instance(); } if (null === $decodeTransform) { $decodeTransform = Base64DecodeTransform::instance(); } parent::__construct($encodeTransform, $decodeTransform); }
/** * Create the transform. * * @return TransformInterface The data transform. */ protected function createTransform() { return Base64DecodeTransform::instance(); }