public function addNamespace($namespace)
    {
        // Assume no operation
        $result = in_array($namespace, $this->getNamespaces());

        // Check if not already set
        if (false === $result) {

            // make array for iteration
            if (is_string($namespace)) {
                $namespace = [$namespace];
            }

            // iterate over namespaces and
            foreach ($namespace as $singleNamespace) {
                // store namespace
                $this->namespaces[] = $singleNamespace;
            }

            // Namespace add = namespace changed event
            $this->namespaceChanged();

            $result = true;
        }

        return $result;
    }
public function addNamespace($namespace)
    {
        // Assume no operation
        $result = in_array($namespace, $this->getNamespaces());

        // Check if not already set
        if (false === $result) {

            // make array for iteration
            if (is_string($namespace)) {
                $namespace = [$namespace];
            }

            // iterate over namespaces and
            foreach ($namespace as $singleNamespace) {
                // store namespace
                $this->namespaces[] = $singleNamespace;
            }

            // Namespace add = namespace changed event
            $this->namespaceChanged();

            $result = true;
        }

        return $result;
    }
public function addNamespace ( $ namespace ) { // Assume no operation $ result = in_array ( $ namespace , $ this -> getNamespaces ( ) ) ; // Check if not already set if ( false === $ result ) { // make array for iteration if ( is_string ( $ namespace ) ) { $ namespace = [ $ namespace ] ; } // iterate over namespaces and foreach ( $ namespace as $ singleNamespace ) { // store namespace $ this -> namespaces [ ] = $ singleNamespace ; } // Namespace add = namespace changed event $ this -> namespaceChanged ( ) ; $ result = true ; } return $ result ; }
Adds a namespace to the list of active namespaces.

This method is intend to add a namespace to the list of active namespaces.

@param mixed $namespace STRING single namespace, or ARRAY collection of namespaces

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if namespace(s) have been added, otherwise FALSE
Adds a namespace to the list of active namespaces .