PHP code example of raphaelscheinkoenig / lom

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

    

raphaelscheinkoenig / lom example snippets



use Ytake\Lom\Meta\Data;

/**
 * Class DataAnnotation
 * @Data
 */
class DataAnnotation
{

    /**
     * @var string $message
     */
    protected $message;

    /**
     * @var string $testing
     */
    protected $testing;

}



use Ytake\Lom\Meta\Data;

/**
 * Class DataAnnotation
 * @Data
 */
class DataAnnotation
{

    /**
     * @var string $message
     */
    protected $message;

    public function getMessage()
    {
        return $this->message; 
    }
    
    public function setMessage($message)
    {
        $this->message = $message; 
    }
}


use Ytake\Lom\Meta\NoArgsConstructor;

/**
 * Class DataAnnotation
 * @NoArgsConstructor
 */
class DataAnnotation
{

    public function __construct($message)
    {
        $this->message = $message;
    }
}



use Ytake\Lom\Meta\NoArgsConstructor;

/**
 * Class DataAnnotation
 * @NoArgsConstructor
 */
class DataAnnotation
{

}



use Ytake\Lom\Meta\AllArgsConstructor;

/**
 * Class DataAnnotation
 * @AllArgsConstructor
 */
class DataAnnotation
{

    protected $arg1;
    
    protected $arg2;
}



use Ytake\Lom\Meta\AllArgsConstructor;

/**
 * Class DataAnnotation
 * @AllArgsConstructor
 */
class DataAnnotation
{

    protected $arg1;
    
    protected $arg2;
    
    public function __construct($arg1, $arg2)
    {
        $this->arg1 = $arg1;
        $this->arg2 = $arg2;
    }
}