You are here

public static function ResourceManagerInterface::isValidCallback in RESTful 7.2

Determine if a callback is valid.

Parameters

mixed $callback: There are 3 ways to define a callback:

  • String with a function name. Ex: 'drupal_map_assoc'.
  • An array containing an object and a method name of that object. Ex: array($this, 'format').
  • An array containing any of the methods before and an array of parameters to pass to the callback. Ex: array(array($this, 'processing'), array('param1', 2))

Return value

bool TRUE if the provided callback can be used in static::executeCallback.

1 method overrides ResourceManagerInterface::isValidCallback()
ResourceManager::isValidCallback in src/Resource/ResourceManager.php
Determine if a callback is valid.

File

src/Resource/ResourceManagerInterface.php, line 116
Contains \Drupal\restful\Resource\ResourceManagerInterface.

Class

ResourceManagerInterface

Namespace

Drupal\restful\Resource

Code

public static function isValidCallback($callback);