PHP code example of martenb / nextras-orm-code-generator
1. Go to this page and download the library: Download martenb/nextras-orm-code-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/ */
martenb / nextras-orm-code-generator example snippets
namespace App\Model\Orm\Product;
/**
* @property int $id {primary}
*/
class Product extends BaseEntity
{
}
namespace App\Model\Orm\Product;
class ProductsRepository extends BaseRepository
{
public static function getEntityClassNames(): array
{
return [Product::class];
}
}
namespace App\Model\Orm\Product;
class ProductsMapper extends BaseMapper
{
}