Files
scummvm-web/include/Objects/BasicObject.php
T
Eugene Sandulenko baf10b1d1a WEB: Fix warning
2015-11-02 07:15:17 +01:00

20 lines
457 B
PHP

<?php
/**
* The BasicObject class is inherited by all other objects and houses all common
* functions.
*/
abstract class BasicObject {
/**
* If the input array doesn't contain the numerical key 0, wrap it inside
* an array. This functions operates on the data directly.
*
* @param mixed &$data the input
*/
static public function toArray(&$data) {
if (!is_array($data) || !array_key_exists(0, $data)) {
$data = array($data);
}
}
}
?>