Commit f87c3675 authored by Luc Dehand's avatar Luc Dehand

delete definition RESOURCES_PATH

parent 6db61f56
......@@ -20,9 +20,6 @@
#
# ***** END LICENSE BLOCK *****
// path to the resources directory
define("RESOURCES_PATH", dirname(__FILE__).'/../../rest/resources/');
/**
* RESTC Rest Controller
* @package REST
......
......@@ -36,6 +36,11 @@ class ServiceEnumerator
public static function listDefinedResources() {
$resources = array();
if (self::$listResources === null) {
// verify if RESOURCES_PATH is defined
if (!defined('RESOURCES_PATH')) {
throw new Exception('RESOURCES_PATH is not defined');
}
$dir = new DirectoryIterator(RESOURCES_PATH);
foreach ($dir as $file) {
$filename = $file->getFileName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment