/** * @param $input * @param \Morrelinko\Datran\Builder\Builder $builder * @return mixed */ public function transform($input, Builder $builder = null) { $input = $this->fromType->decode($input); if ($builder) { $builder->build($input); } return $this->toType->encode($input); }
/** * Get the image type object * * @return Type\TypeInterface */ public function type() { if (null === $this->type) { $this->type = new Type\Svg($this); } if (null === $this->type->getImage()) { $this->type->setImage($this); } return $this->type; }