src/Initially/Rpc/Proxy/BuilderAbstract.php
protected function parseProxyClassInfo()
    {
        $arr = explode("\\", $this->interface);
        $name = array_pop($arr);
        $matches = array();
        if (!preg_match($this->getClassNameRule(), $name, $matches)) {
            throw new InitiallyRpcException("Proxy builder error: interface name must ending of '{$this->interfaceEndOf}' like 'DemoService{$this->interfaceEndOf}'");
        }

        $replace = $this->config->getReplace();
        $replaceKey = $this->service->getReplaceKey();
        if (!empty($arr) && !empty($replace) && isset($replace[$replaceKey])) {
            foreach ($arr as $key => $value) {
                if (isset($replace[$replaceKey][$value])) {
                    $arr[$key] = $replace[$replaceKey][$value];
                }
            }
        }

        $namespace = implode("\\", $arr);
        $info = new ProxyClassInfo();
        $info->setNamespace($namespace);
        $info->setClassName($matches[1]);

        return $info;
    }
protected function parseProxyClassInfo()
    {
        $arr = explode("\\", $this->interface);
        $name = array_pop($arr);
        $matches = array();
        if (!preg_match($this->getClassNameRule(), $name, $matches)) {
            throw new InitiallyRpcException("Proxy builder error: interface name must ending of '{$this->interfaceEndOf}' like 'DemoService{$this->interfaceEndOf}'");
        }

        $replace = $this->config->getReplace();
        $replaceKey = $this->service->getReplaceKey();
        if (!empty($arr) && !empty($replace) && isset($replace[$replaceKey])) {
            foreach ($arr as $key => $value) {
                if (isset($replace[$replaceKey][$value])) {
                    $arr[$key] = $replace[$replaceKey][$value];
                }
            }
        }

        $namespace = implode("\\", $arr);
        $info = new ProxyClassInfo();
        $info->setNamespace($namespace);
        $info->setClassName($matches[1]);

        return $info;
    }
protected function parseProxyClassInfo ( ) { $ arr = explode ( "\\" , $ this -> interface ) ; $ name = array_pop ( $ arr ) ; $ matches = array ( ) ; if ( ! preg_match ( $ this -> getClassNameRule ( ) , $ name , $ matches ) ) { throw new InitiallyRpcException ( "Proxy builder error: interface name must ending of '{$this->interfaceEndOf}' like 'DemoService{$this->interfaceEndOf}'" ) ; } $ replace = $ this -> config -> getReplace ( ) ; $ replaceKey = $ this -> service -> getReplaceKey ( ) ; if ( ! empty ( $ arr ) && ! empty ( $ replace ) && isset ( $ replace [ $ replaceKey ] ) ) { foreach ( $ arr as $ key => $ value ) { if ( isset ( $ replace [ $ replaceKey ] [ $ value ] ) ) { $ arr [ $ key ] = $ replace [ $ replaceKey ] [ $ value ] ; } } } $ namespace = implode ( "\\" , $ arr ) ; $ info = new ProxyClassInfo ( ) ; $ info -> setNamespace ( $ namespace ) ; $ info -> setClassName ( $ matches [ 1 ] ) ; return $ info ; }
Parse interface info

@return ProxyClassInfo
@throws InitiallyRpcException
Parse interface info