class D3LibraryInfoController in d3.js 7
Base handler for library info files.
Hierarchy
- class \D3LibraryInfoController
Expanded class hierarchy of D3LibraryInfoController
1 string reference to 'D3LibraryInfoController'
- d3_get_library_info_handlers_info in ./
d3.module - Get information on all info handlers.
File
- includes/
D3LibraryInfoController.inc, line 10 - D3 library info controller class.
View source
class D3LibraryInfoController {
/**
* Mapping class.
*
* @var D3DataMapping
*/
public $mapping;
/**
* Processor class.
*
* @var D3LibraryInfoProcessor
*/
public $processor;
/**
* Library fully loaded.
*
* @var array.
*/
protected $library;
public function __construct($args = array()) {
if (!empty($args['mapping']) && class_exists($args['mapping'])) {
$this->mapping = new $args['mapping']($this);
}
if (!empty($args['processor']) && class_exists($args['processor'])) {
$this->processor = new $args['processor']($this);
}
}
/**
* Set the current library for this handler.
*/
public function setLibrary(&$library) {
$this->library =& $library;
}
public function machineName() {
return !empty($this->library['machine name']) ? $this->library['machine name'] : FALSE;
}
/**
* Helper function to get child elements.
*/
protected function children($elements) {
foreach ($elements as $key => &$value) {
if (is_array($value)) {
$this
->children($value);
}
if ($key == '_info') {
unset($elements[$key]);
}
}
return $elements;
}
/**
* Return a reference to the loaded library.
*/
public function &value() {
return $this->library;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
D3LibraryInfoController:: |
protected | property | Library fully loaded. | |
D3LibraryInfoController:: |
public | property | Mapping class. | |
D3LibraryInfoController:: |
public | property | Processor class. | |
D3LibraryInfoController:: |
protected | function | Helper function to get child elements. | |
D3LibraryInfoController:: |
public | function | ||
D3LibraryInfoController:: |
public | function | Set the current library for this handler. | |
D3LibraryInfoController:: |
public | function | Return a reference to the loaded library. | |
D3LibraryInfoController:: |
public | function |