function _rest_server_get_spyc_location in Services 6.3
Return the location of the spyc library, if any.
Return value
the location of the spyc library, if it exists; else return false.
6 calls to _rest_server_get_spyc_location()
- hook_rest_server_response_formatters_alter in servers/
rest_server/ rest_server.api.php - Triggered when the REST server request a list of supported response formats.
- RESTServer::parseYAML in servers/
rest_server/ includes/ RESTServer.inc - RESTServerViewBuiltIn::render_yaml in servers/
rest_server/ includes/ rest_server.views.inc - rest_server_request_parsers in servers/
rest_server/ rest_server.module - Builds a list of request parsers that are available to the RESTServer.
- rest_server_requirements in servers/
rest_server/ rest_server.install - Implements hook_requirements().
File
- servers/
rest_server/ rest_server.module, line 235
Code
function _rest_server_get_spyc_location() {
if (function_exists('libraries_get_path')) {
$libraries_spyc_loc = libraries_get_path('spyc') . '/spyc.php';
if (file_exists($libraries_spyc_loc)) {
return $libraries_spyc_loc;
}
}
// Libraries not in use fall back to straight look up.
$services_spyc_loc = dirname(__FILE__) . '/lib/spyc.php';
return file_exists($services_spyc_loc) ? $services_spyc_loc : false;
}