public function setContainerName(string $containerName) 
    {
        if (empty($containerName) || !(preg_match('/^[a-zA-Z0-9\\\\_]*$/', $containerName)) || is_numeric($containerName[0]))
        {
            throw new ContainerBuilderException('The container name cannot be empty, start with a number or contain sepcial characters except "\\".');
        }

        if ($containerName[0] === "\\")
        {
            $containerName = substr($containerName, 1);
        }

        $this->containerClassName = $this->containerName = $containerName;

        // check if we need to generate a namespace
        if (($pos = strrpos($containerName, "\\")) !== false)
        {
            $this->containerNamespace = substr($containerName, 0, $pos);
            $this->containerClassName = substr($containerName, $pos + 1);
        }
    }
public function setContainerName(string $containerName) 
    {
        if (empty($containerName) || !(preg_match('/^[a-zA-Z0-9\\\\_]*$/', $containerName)) || is_numeric($containerName[0]))
        {
            throw new ContainerBuilderException('The container name cannot be empty, start with a number or contain sepcial characters except "\\".');
        }

        if ($containerName[0] === "\\")
        {
            $containerName = substr($containerName, 1);
        }

        $this->containerClassName = $this->containerName = $containerName;

        // check if we need to generate a namespace
        if (($pos = strrpos($containerName, "\\")) !== false)
        {
            $this->containerNamespace = substr($containerName, 0, $pos);
            $this->containerClassName = substr($containerName, $pos + 1);
        }
    }
public function setContainerName ( string $ containerName ) { if ( empty ( $ containerName ) || ! ( preg_match ( '/^[a-zA-Z0-9\\\\_]*$/' , $ containerName ) ) || is_numeric ( $ containerName [ 0 ] ) ) { throw new ContainerBuilderException ( 'The container name cannot be empty, start with a number or contain sepcial characters except "\\".' ) ; } if ( $ containerName [ 0 ] === "\\" ) { $ containerName = substr ( $ containerName , 1 ) ; } $ this -> containerClassName = $ this -> containerName = $ containerName ; // check if we need to generate a namespace if ( ( $ pos = strrpos ( $ containerName , "\\" ) ) !== false ) { $ this -> containerNamespace = substr ( $ containerName , 0 , $ pos ) ; $ this -> containerClassName = substr ( $ containerName , $ pos + 1 ) ; } }
Sets the container name
This will also update the "containerClassName" and "containerNamespace"

@param string            $containerName
@return void
Sets the container name This will also update the containerClassName and containerNamespace