PHP code example of opifer / revisions

1. Go to this page and download the library: Download opifer/revisions 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/ */

    

opifer / revisions example snippets

 php

namespace Entity;

use Opifer\Revisions\Mapping\Annotation as Revisions;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table(name="articles")
 * @ORM\Entity
 */
class Article
{
    /** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
    private $id;

    /**
     * @Revisions\Revised
     * @ORM\Column(length=128)
     */
    private $title;

    /**
     * @Revisions\Revised
     * @ORM\Column(type="text")
     */
    private $content;

    /**
     * @Revisions\Draft
     */
    private $draft;
}