PHP code example of webforge / symfony

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

    

webforge / symfony example snippets



  
use Doctrine\ORM\Mapping AS ORM;
use JMS\Serializer\Annotation AS Serializer;

class EntityWithTimestamp {

  /**
   * modified timestamp saves the time and date of the last modification
   * 
   * @var Webforge\Common\DateTime\DateTime
   * @ORM\Column(type="WebforgeDateTime", nullable=true)
   * @Serializer\Expose
   * @Serializer\Type("WebforgeDateTime")
   */
  protected $modified = NULL;


  public function updateModified() {
    $this->modified = \Webforge\Common\DateTime\DateTime::now();
  }
}