예제 #1
0
파일: Base16.php 프로젝트: eloquent/endec
 /**
  * Construct a new base16 (hexadecimal) 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 = Base16EncodeTransform::instance();
     }
     if (null === $decodeTransform) {
         $decodeTransform = Base16DecodeTransform::instance();
     }
     parent::__construct($encodeTransform, $decodeTransform);
 }
 /**
  * Create the transform.
  *
  * @return TransformInterface The data transform.
  */
 protected function createTransform()
 {
     return Base16EncodeTransform::instance();
 }