我在我的智慧的尽头试图破译为什么这不起作用。我正在尝试从我的 Drupal 7 实例设置一个 REST 服务器。目前专注于不需要身份验证(一旦我设法让它说话,我就会设置它)。
这是相关的代码位:
mymodule.module
/**
* Implements hook_ctools_plugin_api().
* Declares the mymodule services endpoint (stored in
* mymodule.services.inc). Note that the referenced ctools
* hook obviates creating this endpoint through the UI.
*/
function mymodule_ctools_plugin_api($owner, $api) {
if ($owner == 'services' && $api == 'services') {
return array(
'version' => 3,
'file' => 'mymodule.services.inc',
'path' => drupal_get_path('module', 'mymodule'),
);
}
}
/**
* Implements hook_services_resources
* Defines the resources available via services module (REST, in this …Run Code Online (Sandbox Code Playgroud) Drupal的Services层可以获取节点等,但有没有办法将Drupal限制为一个Services层,其中前端完全不是Drupal/PHP.有没有办法防止Drupal在任何地方提货,只有非drupal接口加载,然后通过Services层与Drupal通信?