public function rename(string $interface, string $newName, string $sourceName = Name::ANY, string $targetInterface = '')
    {
        $targetInterface = $targetInterface ?: $interface;
        if ($this->lastModule instanceof self) {
            $this->lastModule->getContainer()->move($interface, $sourceName, $targetInterface, $newName);
        }
    }
public function rename(string $interface, string $newName, string $sourceName = Name::ANY, string $targetInterface = '')
    {
        $targetInterface = $targetInterface ?: $interface;
        if ($this->lastModule instanceof self) {
            $this->lastModule->getContainer()->move($interface, $sourceName, $targetInterface, $newName);
        }
    }
public function rename ( string $ interface , string $ newName , string $ sourceName = Name :: ANY , string $ targetInterface = '' ) { $ targetInterface = $ targetInterface ? : $ interface ; if ( $ this -> lastModule instanceof self ) { $ this -> lastModule -> getContainer ( ) -> move ( $ interface , $ sourceName , $ targetInterface , $ newName ) ; } }
Rename binding name

@param string $interface       Interface
@param string $newName         New binding name
@param string $sourceName      Original binding name
@param string $targetInterface Original interface
Rename binding name