mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
In the new data model, some field operate as keys for other parts of the model. This now performs some validations and will throw an error if fields are missing. For example: a Game must have an Engine, but does not require datafiles
33 lines
688 B
PHP
33 lines
688 B
PHP
<?php
|
|
namespace ScummVM\Objects;
|
|
|
|
/**
|
|
* The Company object represents a companies that created games supported
|
|
* by ScummVM.
|
|
*/
|
|
class Company extends DataObject
|
|
{
|
|
private $name;
|
|
private $alt_name;
|
|
|
|
/* Article object constructor. */
|
|
public function __construct($data)
|
|
{
|
|
parent::__construct($data);
|
|
$this->name = $this->assignFromArray('name', $data, true);
|
|
$this->alt_name = $this->assignFromArray('alt_name', $data);
|
|
}
|
|
|
|
/* Get the company name. */
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/* Get the alternative name */
|
|
public function getAltName()
|
|
{
|
|
return $this->alt_name;
|
|
}
|
|
}
|