PHP code example of subsan / entity-generator
1. Go to this page and download the library: Download subsan/entity-generator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
subsan / entity-generator example snippets
namespace Subsan\EntityGenerator;
class GeneratorConfigField
{
/**
* @var string Name of field
*/
private $name;
/**
* @var string Type of field
*/
private $type;
/**
* @var string|null Description for field
*/
private $description;
public function getName(): string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getType(): string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
}
sh
vendor/bin/entityGenerator vendor/subsan/entity-generator/example/GeneratorConfigField.yaml > GeneratorConfigField.php