Files
scummvm-web/include/Objects/BasicObject.php
T
2019-01-22 19:49:58 -05:00

24 lines
552 B
PHP

<?php
namespace ScummVM\Objects;
/**
* The BasicObject class is inherited by all other objects and houses all common
* functions.
*/
abstract class BasicObject
{
protected $name;
/**
* 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
*/
public static function toArray(&$data)
{
if (!is_array($data) || !array_key_exists(0, $data)) {
$data = array($data);
}
}
}