Add a transformation to the manager

@param string $name Name of the transformation
@param mixed $transformation Class name, Transformation instace or callable that returns one
@return self
543041
public function addTransformation($name, $transformation) {
        if ($transformation instanceof Transformation) {
            $this->handlers[$name] = $transformation;
        } else {
            $this->transformations[$name] = $transformation;
        }

        return $this;
    }
400411
public function child($name)
    {
        $path = $this->normalize($name);

        $this->append($path);

        return $this;
    }
781429
public function withName(string $name): self
    {
        $self = clone $this;
        $self->name = $name;

        return $self;
    }
741471
public function addNameIfNotExists($name) {
    if (!isset($this->children[$name])) {
      $this->internalAddName($name);
    }
    return $this;
  }
395752
public function rename(string $name) : self
    {
        $this->requiresCurrentField();
        $this->newObj['$rename'][$this->currentField] = $name;
        return $this;
    }
420973
public function setTransforms(iterable $transforms): self
	{
		$this->transforms = [];

		foreach ($transforms as $transform) {
			$this->assertTransform($transform);
			$this->addTransform($transform, false);
		}

		$this->setOptions['transforms'] = null;

		return $this;
	}
496307
public function setTransform(\Jdenticon\Rendering\Transform $transform) 
    {
        $this->transform = $transform === null ? 
            Transform::getEmpty() : $transform;
    }
1318309
public function add(TranslatorInterface $translator)
    {
        $hash = spl_object_hash($translator);

        $this->translators[$hash] = $translator;

        return $this;
    }
202763
public function setTransformation($transformation)
    {
        if (is_callable($transformation)) {
            $this->transformationMethod = $transformation;

            return $this;
        }

        // replace just to avoid wrongly passing the name containing "Transformation".
        $methodName = str_replace('Transformation', '', $transformation) . "Transformation";

        if (! method_exists($this, $methodName)) {
            throw new TransformerException("No such transformation as $methodName defined.");
        }

        $this->transformationMethod = [$this, $methodName];

        return $this;
    }
462331
public function addResolver(string $name, callable $callback)
    {
        //if it's a closure, they meant to bind the callback
        if ($callback instanceof Closure) {
            //so there's no scope
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getResolverHandler()->register($name, $callback);

        return $this;
    }
839998
public function addTo($email, $name = null)
    {
        $this->to = array_merge($this->to, $this->transformEmailName($email, $name));

        return $this;
    }
563169
public function make( $name )
	{
		$this->name = ucfirst( camel_case( $name ) );
		$this->createContract();
		$this->createBlueprint();
		$this->createModel();
		$this->addToEnsphereRegistration();
		$this->reRegister();
	}
506246
public function replaceState(string $name, $state): self
    {
        $this->state[$name] = $state;
        return $this;
    }
12370
public function add(string $name, callable $callback): self
    {
        if ($this->exists($name)) {
            throw new LogicException(
                'The helper function name "' . $name . '" is already registered.'
            );
        }

        $this->helpers[$name] = $callback;

        return $this;
    }
365557
public static function createEmbedMany(string $name): NormalizationFieldMappingBuilderInterface
    {
        $self = new self($name);
        $self->fieldNormalizer = new EmbedManyFieldNormalizer(new PropertyAccessor($name));

        return $self;
    }
918837
public function removeTransformation(TransformationInterface $transformation)
    {

        $this->transformations = array_filter($this->transformations, function (TransformationInterface $t) use ($transformation) {

            return $t !== $transformation;
        });

        return $this;
    }
903002
public function addAlias(string $name, string $className)
    {
        $this->aliases[$name] = $className;
        return $this;
    }