public function __construct($name, $metadata) { $this->name = $name; $this->metadata = new Metadata($metadata); }