PHP code example of kokoroe / mapper

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

    

kokoroe / mapper example snippets




class Article
{
    protected $title;

    protected $content;

    protected $author;

    protected $tags = [];

    public function setTitle($title)
    {
        $this->title = $title;
    }

    public function setContent($content)
    {
        $this->content = $content;
    }

    public function setAuthor(User $author)
    {
        $this->author = $author;
    }

    public function setTags(array $tags)
    {
        $this->tags = $tags;
    }