Example #1
0
                                                                        require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php';
                                                                        $tmpclass = new ReflectionClass($classname);
                                                                        try {
                                                                            $classMetadata = CommentParser::parse($tmpclass->getDocComment());
                                                                        } catch (Exception $e) {
                                                                            throw new RestException(500, "Error while parsing comments of `$classname` class. " . $e->getMessage());
                                                                        }*/
                                    //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
$listofapis = Routes::toArray();
//var_dump($listofapis);
llxHeader();
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("ApiSetup"), $linkback, 'title_setup');
foreach ($listofapis['v1'] as $key => $val) {
    if ($key) {
        //print $key.' - '.$val['classname'].' - '.$val['fullpath']." - ".DOL_MAIN_URL_ROOT.'/api/index.php/'.strtolower(preg_replace('/Api$/','',$val['classname']))."/xxx<br>\n";
        $url = DOL_MAIN_URL_ROOT . '/api/index.php/' . $key;
        print img_picto('', 'object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
    }
}
llxFooter();
$db->close();