src/xAC.php
public static function getServicesList()
    {
        $map = [
          'GET' => 'get',
          'POST' => 'create',
          'PUT' => 'update',
          'DELETE' => 'delete',
        ];
        
        $table = new \Console_Table();
        $table->setHeaders(['Method', 'Type', 'Description', 'Parameters']);
        foreach (self::getServices() as $key => $service) {
            if ($service['type'] == 'entity') {
                foreach ($service['actions'] as $action) {
                    $table->addRow([
                        sprintf('xAC::%s()->%s()'
                            , $service['endpoint']
                            , $action['endpoint'] == 'default' ? $map[$action['method']] : $action['endpoint']
                            ), 
                        'entity/' . $action['type'], 
                        $action['description']
                    ]);
                }
            } else {
                $table->addRow(['xAC::' . $service['endpoint'] . '()->get()', $service['type'], $service['description']]);
            }
        }
        
        echo $table->getTable();
    }
public static function getServicesList()
    {
        $map = [
          'GET' => 'get',
          'POST' => 'create',
          'PUT' => 'update',
          'DELETE' => 'delete',
        ];
        
        $table = new \Console_Table();
        $table->setHeaders(['Method', 'Type', 'Description', 'Parameters']);
        foreach (self::getServices() as $key => $service) {
            if ($service['type'] == 'entity') {
                foreach ($service['actions'] as $action) {
                    $table->addRow([
                        sprintf('xAC::%s()->%s()'
                            , $service['endpoint']
                            , $action['endpoint'] == 'default' ? $map[$action['method']] : $action['endpoint']
                            ), 
                        'entity/' . $action['type'], 
                        $action['description']
                    ]);
                }
            } else {
                $table->addRow(['xAC::' . $service['endpoint'] . '()->get()', $service['type'], $service['description']]);
            }
        }
        
        echo $table->getTable();
    }
public static function getServicesList ( ) { $ map = [ 'GET' => 'get' , 'POST' => 'create' , 'PUT' => 'update' , 'DELETE' => 'delete' , ] ; $ table = new \ Console_Table ( ) ; $ table -> setHeaders ( [ 'Method' , 'Type' , 'Description' , 'Parameters' ] ) ; foreach ( self :: getServices ( ) as $ key => $ service ) { if ( $ service [ 'type' ] == 'entity' ) { foreach ( $ service [ 'actions' ] as $ action ) { $ table -> addRow ( [ sprintf ( 'xAC::%s()->%s()' , $ service [ 'endpoint' ] , $ action [ 'endpoint' ] == 'default' ? $ map [ $ action [ 'method' ] ] : $ action [ 'endpoint' ] ) , 'entity/' . $ action [ 'type' ] , $ action [ 'description' ] ] ) ; } } else { $ table -> addRow ( [ 'xAC::' . $ service [ 'endpoint' ] . '()->get()' , $ service [ 'type' ] , $ service [ 'description' ] ] ) ; } } echo $ table -> getTable ( ) ; }
Display a list of available service on console

execute from the application folder:
php -r "require 'vendor/autoload.php'; Arrowsphere\Client\xAC::getServicesList();"
Display a list of available service on console