public function &get($instance_id) {
$resource = parent::get($instance_id);
// Allow altering the resource, this way we can read the resource's
// definition to return a different class that is using composition.
drupal_alter('restful_resource', $resource);
$resource = $resource->isEnabled() ? $resource : NULL;
}
All hooks hook_restful_resource_alter are called all time when resource getting from resource collection.
/restful/src/Resource/ResourcePluginCollection.php