You are here

class ServicesParserYAML in Services 7.3

Hierarchy

Expanded class hierarchy of ServicesParserYAML

1 string reference to 'ServicesParserYAML'
rest_server_request_parsers in servers/rest_server/rest_server.module
Builds a list of request parsers that are available to the RESTServer.

File

servers/rest_server/includes/ServicesParser.inc, line 133

View source
class ServicesParserYAML implements ServicesParserInterface {
  public function parse(ServicesContextInterface $context) {
    if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
      return Spyc::YAMLLoadString($context
        ->getPostData());
    }
    else {
      watchdog('REST Server', 'Spyc library not found!', array(), WATCHDOG_ERROR);
      return array();
    }
  }

}

Members