Dumplie\Metadata\Schema::add PHP Метод

add() публичный Метод

public add ( TypeSchema $typeSchema )
$typeSchema Dumplie\Metadata\Schema\TypeSchema
    public function add(TypeSchema $typeSchema)
    {
        $this->types[$typeSchema->name()] = $typeSchema;
    }

Usage Example

Пример #1
0
 /**
  * @return Schema
  */
 public function build() : Schema
 {
     $schema = new Schema($this->name);
     foreach ($this->types as $type) {
         $schema->add($type);
     }
     return $schema;
 }
All Usage Examples Of Dumplie\Metadata\Schema::add