| 1 | <?php |
||
| 9 | class License extends AbstractModel implements Arrayable { |
||
| 10 | |||
| 11 | use UrlPart; |
||
| 12 | use ExtensionPart; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | private $name; |
||
| 16 | |||
| 17 | 10 | public function __construct($contents = []) { |
|
| 20 | |||
| 21 | 10 | public function merge($contents, $strategy = self::PREFER_ORIGINAL) { |
|
| 22 | 10 | $data = CollectionUtils::toMap($contents); |
|
| 23 | |||
| 24 | 10 | $this->mergeFields($this->name, $data->get('name'), $strategy); |
|
| 25 | |||
| 26 | // extensions |
||
| 27 | 10 | $this->parseUrl($data); |
|
| 28 | 10 | $this->parseExtensions($data); |
|
| 29 | 10 | } |
|
| 30 | |||
| 31 | 7 | public function toArray() { |
|
| 34 | |||
| 35 | /** |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 1 | public function getName() { |
|
| 42 | |||
| 43 | /** |
||
| 44 | * |
||
| 45 | * @param string $name |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | 1 | public function setName($name) { |
|
| 52 | |||
| 53 | } |
||
| 54 |