src/Template.php
public function addExtension($className)
    {
        $object = is_object($className) ? $className : null;
        $className = is_object($className) ? get_class($object) : $className;

        $this->checkExtension($className);

        self::$extensions[$className] = $object;
        return $this;
    }
public function addExtension($className)
    {
        $object = is_object($className) ? $className : null;
        $className = is_object($className) ? get_class($object) : $className;

        $this->checkExtension($className);

        self::$extensions[$className] = $object;
        return $this;
    }
public function addExtension ( $ className ) { $ object = is_object ( $ className ) ? $ className : null ; $ className = is_object ( $ className ) ? get_class ( $ object ) : $ className ; $ this -> checkExtension ( $ className ) ; self :: $ extensions [ $ className ] = $ object ; return $ this ; }
Adds an extension to the template engine

@param string|object $className The class name or an instance
of EngineExtensionInterface interface

@return self|$this|Template
Adds an extension to the template engine