1. Go to this page and download the library: Download edin/entityparser 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/ */
php demo.php parse Blog --php
class User
{
public $Id;
public $FirstName;
public $LastName;
public $Email;
public $UserName;
public $PasswordHash;
public $Modified;
public $Created;
}
class Comment
{
public $Id;
public $UserId;
public $PostId;
public $Text;
public $Modified;
public $Created;
}
class Post
{
public $Id;
public $UserId;
public $Title;
public $Content;
public $Modified;
public $Created;
}
cmd
php demo.php parse Blog --const
Constants:
Constant: unitNamespace = app\data
Constant: unitDir = blog
Constant: unitName = BlogDbContext
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.