src/Server.php
private function info()
    {
        $response = [
            'class' => []
        ];
        
        foreach ($this->config["classes"] as $key => $val) {
            
            // addtional config
            $response["class"][$key]["config"] = !empty($val[1]) ? $val[1] : [];
            
            // check class file exists
            if (!file_exists($val[0])) {
                $response["class"][$key]["methods"] = [];
                continue;
            }
            
            //
            require($val[0]);

            $reflection = new \ReflectionClass($key);

            foreach ($reflection->getMethods() as $method) {
                if (!in_array($method->getName(), ["__construct"])) {
                    $param = [];
                    foreach ($method->getParameters() as $parameter) {
                        $param[] = $parameter->getName();
                    }
                    $response["class"][$key]["methods"][$method->getName()] = $param;
                }
            }
        }

        return $response;
    }
private function info()
    {
        $response = [
            'class' => []
        ];
        
        foreach ($this->config["classes"] as $key => $val) {
            
            // addtional config
            $response["class"][$key]["config"] = !empty($val[1]) ? $val[1] : [];
            
            // check class file exists
            if (!file_exists($val[0])) {
                $response["class"][$key]["methods"] = [];
                continue;
            }
            
            //
            require($val[0]);

            $reflection = new \ReflectionClass($key);

            foreach ($reflection->getMethods() as $method) {
                if (!in_array($method->getName(), ["__construct"])) {
                    $param = [];
                    foreach ($method->getParameters() as $parameter) {
                        $param[] = $parameter->getName();
                    }
                    $response["class"][$key]["methods"][$method->getName()] = $param;
                }
            }
        }

        return $response;
    }
private function info ( ) { $ response = [ 'class' => [ ] ] ; foreach ( $ this -> config [ "classes" ] as $ key => $ val ) { // addtional config $ response [ "class" ] [ $ key ] [ "config" ] = ! empty ( $ val [ 1 ] ) ? $ val [ 1 ] : [ ] ; // check class file exists if ( ! file_exists ( $ val [ 0 ] ) ) { $ response [ "class" ] [ $ key ] [ "methods" ] = [ ] ; continue ; } // require ( $ val [ 0 ] ) ; $ reflection = new \ ReflectionClass ( $ key ) ; foreach ( $ reflection -> getMethods ( ) as $ method ) { if ( ! in_array ( $ method -> getName ( ) , [ "__construct" ] ) ) { $ param = [ ] ; foreach ( $ method -> getParameters ( ) as $ parameter ) { $ param [ ] = $ parameter -> getName ( ) ; } $ response [ "class" ] [ $ key ] [ "methods" ] [ $ method -> getName ( ) ] = $ param ; } } } return $ response ; }
Return info about available classes

<code>
$client->info();
</code>

@return array
Return info about available classes