protected function setAddonConfigNamespaces()
    {
        if (file_exists($this->addon->path('addon.php'))) {
            $search = [
                "namespace {$this->currentNamespace}",
                "'namespace' => '{$this->currentNamespace}'",
                "'{$this->currentNamespace}\\",
                "\"{$this->currentNamespace}\\",
                "\\{$this->currentNamespace}\\",
            ];

            $replace = [
                "namespace {$this->newNamespace}",
                "'namespace' => '{$this->newNamespace}'",
                "'{$this->newNamespace}\\",
                "\"{$this->newNamespace}\\",
                "\\{$this->newNamespace}\\",
            ];

            $this->replaceIn($this->addon->path('addon.php'), $search, $replace);
        }
    }
protected function setAddonConfigNamespaces()
    {
        if (file_exists($this->addon->path('addon.php'))) {
            $search = [
                "namespace {$this->currentNamespace}",
                "'namespace' => '{$this->currentNamespace}'",
                "'{$this->currentNamespace}\\",
                "\"{$this->currentNamespace}\\",
                "\\{$this->currentNamespace}\\",
            ];

            $replace = [
                "namespace {$this->newNamespace}",
                "'namespace' => '{$this->newNamespace}'",
                "'{$this->newNamespace}\\",
                "\"{$this->newNamespace}\\",
                "\\{$this->newNamespace}\\",
            ];

            $this->replaceIn($this->addon->path('addon.php'), $search, $replace);
        }
    }
protected function setAddonConfigNamespaces ( ) { if ( file_exists ( $ this -> addon -> path ( 'addon.php' ) ) ) { $ search = [ "namespace {$this->currentNamespace}" , "'namespace' => '{$this->currentNamespace}'" , "'{$this->currentNamespace}\\" , "\"{$this->currentNamespace}\\" , "\\{$this->currentNamespace}\\" , ] ; $ replace = [ "namespace {$this->newNamespace}" , "'namespace' => '{$this->newNamespace}'" , "'{$this->newNamespace}\\" , "\"{$this->newNamespace}\\" , "\\{$this->newNamespace}\\" , ] ; $ this -> replaceIn ( $ this -> addon -> path ( 'addon.php' ) , $ search , $ replace ) ; } }
Set the namespace in addon.php file.
Set the namespace in addon . php file .