PHP code example of limingxinleo / swoft-trait-instance
1. Go to this page and download the library: Download limingxinleo/swoft-trait-instance 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/ */
limingxinleo / swoft-trait-instance example snippets
use Xin\Swoft\Traits\InstanceTrait;
class Incr
{
use InstanceTrait;
public $incr = 0;
public function incr()
{
return ++$this->incr;
}
public function get()
{
return $this->incr;
}