PHP code example of tomas / message

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

    

tomas / message example snippets




namespace -Your namespace-

use Anax\DI\CDIFactoryDefault;
use tomas\Message\Message;

class CDIFactory extends CDIFactoryDefault
{
    public function __construct()
    {
        parent::__construct();

        $this->set('message', function() {
            $message = new Message();
            return $message;
        });
    }
}