class ArrayWrapper in RESTful 7.2
Hierarchy
- class \Drupal\restful\Plugin\resource\DataInterpreter\ArrayWrapper implements ArrayWrapperInterface
Expanded class hierarchy of ArrayWrapper
2 files declare their use of ArrayWrapper
- DataProviderDbQuery.php in src/
Plugin/ resource/ DataProvider/ DataProviderDbQuery.php - Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.
- DataProviderVariable.php in modules/
restful_example/ src/ Plugin/ resource/ variables/ DataProviderVariable.php - Contains \Drupal\restful_example\Plugin\resource\variables\DataProviderVariable.
File
- src/
Plugin/ resource/ DataInterpreter/ ArrayWrapper.php, line 10 - Contains \Drupal\restful\Plugin\resource\DataInterpreter\ArrayWrapper.
Namespace
Drupal\restful\Plugin\resource\DataInterpreterView source
class ArrayWrapper implements ArrayWrapperInterface {
/**
* Plugin configuration.
*
* @var array
*/
protected $data = array();
/**
* Constructs a PluginWrapper object.
*
* @param array $data
* The array to wrap
*/
public function __construct(array $data) {
$this->data = $data;
}
/**
* {@inheritdoc}
*/
public function get($key) {
return isset($this->data[$key]) ? $this->data[$key] : NULL;
}
}Members
|
Name |
Modifiers | Type | Description | Overrides |
|---|---|---|---|---|
|
ArrayWrapper:: |
protected | property | Plugin configuration. | |
|
ArrayWrapper:: |
public | function |
Gets a field from the data array. Overrides ArrayWrapperInterface:: |
|
|
ArrayWrapper:: |
public | function | Constructs a PluginWrapper object. |