public function addUses($args)
    {
        foreach ((array)$args as $key => $value) {
            $value = str_replace('/', '\\', $value);
            if (is_int($key)) {
                // namespace or class import
                if (class_exists($value)) {
                    // class import
                    $this->aliases[StringHelper::basename($value)] = $value;
                } else {
                    // namespace
                    $this->namespaces[] = $value;
                }
            } else {
                // aliased class import
                $this->aliases[$key] = $value;
            }
        }
    }
public function addUses($args)
    {
        foreach ((array)$args as $key => $value) {
            $value = str_replace('/', '\\', $value);
            if (is_int($key)) {
                // namespace or class import
                if (class_exists($value)) {
                    // class import
                    $this->aliases[StringHelper::basename($value)] = $value;
                } else {
                    // namespace
                    $this->namespaces[] = $value;
                }
            } else {
                // aliased class import
                $this->aliases[$key] = $value;
            }
        }
    }
public function addUses ( $ args ) { foreach ( ( array ) $ args as $ key => $ value ) { $ value = str_replace ( '/' , '\\' , $ value ) ; if ( is_int ( $ key ) ) { // namespace or class import if ( class_exists ( $ value ) ) { // class import $ this -> aliases [ StringHelper :: basename ( $ value ) ] = $ value ; } else { // namespace $ this -> namespaces [ ] = $ value ; } } else { // aliased class import $ this -> aliases [ $ key ] = $ value ; } } }
Adds namespaces and aliases from constructor

@param array $args namespaces and classes to use in the template
Adds namespaces and aliases from constructor