Transformer/MailerTransformer.php
public function transform($value)
    {
        if ($value instanceof \Traversable || is_array($value)) {
            return $this->transformIterable($value);
        }

        if (is_bool($value)) {
            return $this->transformBoolean($value);
        }

        if (is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) {
            return $value;
        }

        if ($value instanceof Cache) {
            return $this->transformCacheAnnotation($value);
        }

        if ($value instanceof Method) {
            return $this->transformMethodAnnotation($value);
        }

        if ($value instanceof ParamConverter) {
            return $this->transformParamConverter($value);
        }

        if ($value instanceof Security) {
            return $this->transformSecurity($value);
        }

        if ($value instanceof Template) {
            return $this->transformTemplate($value);
        }

        return get_class($value);
    }
public function transform($value)
    {
        if ($value instanceof \Traversable || is_array($value)) {
            return $this->transformIterable($value);
        }

        if (is_bool($value)) {
            return $this->transformBoolean($value);
        }

        if (is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) {
            return $value;
        }

        if ($value instanceof Cache) {
            return $this->transformCacheAnnotation($value);
        }

        if ($value instanceof Method) {
            return $this->transformMethodAnnotation($value);
        }

        if ($value instanceof ParamConverter) {
            return $this->transformParamConverter($value);
        }

        if ($value instanceof Security) {
            return $this->transformSecurity($value);
        }

        if ($value instanceof Template) {
            return $this->transformTemplate($value);
        }

        return get_class($value);
    }
Transform a value into its array value

@param mixed $value
@return array|string