Changed names of the method to camelCase
Corrected use of dirname(__DIR__) to just __DIR__ , changed use of __dir__  to __DIR__
Changed undefined constant ECHO_JSON to PRINT_JSON