public function setNamespace($namespace)
    {
        if ($namespace === null || $namespace === '' || $namespace === '\\') {
            $this->namespace = null;

            return;
        }

        if ($namespace[0] === '\\') {
            $namespace = substr($namespace, 1);
        }

        if ($this->isNamespaceValid($namespace) !== true) {
            throw new InvalidArgumentException('Namespace name is not valid.');
        }

        $this->namespace = $namespace;
    }
public function setNamespace($namespace)
    {
        if ($namespace === null || $namespace === '' || $namespace === '\\') {
            $this->namespace = null;

            return;
        }

        if ($namespace[0] === '\\') {
            $namespace = substr($namespace, 1);
        }

        if ($this->isNamespaceValid($namespace) !== true) {
            throw new InvalidArgumentException('Namespace name is not valid.');
        }

        $this->namespace = $namespace;
    }
public function setNamespace ( $ namespace ) { if ( $ namespace === null || $ namespace === '' || $ namespace === '\\' ) { $ this -> namespace = null ; return ; } if ( $ namespace [ 0 ] === '\\' ) { $ namespace = substr ( $ namespace , 1 ) ; } if ( $ this -> isNamespaceValid ( $ namespace ) !== true ) { throw new InvalidArgumentException ( 'Namespace name is not valid.' ) ; } $ this -> namespace = $ namespace ; }
Set the namespace name.

@param string $namespace The name of the namespace.
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the namespace is invalid.
Set the namespace name .