1. Go to this page and download the library: Download wiidoo/support 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/ */
wiidoo / support example snippets
use Wiidoo\Support\FluentInterface;
class Example extends FluentInterface
{
public $foo;
public $bar;
public $active = false;
private $result;
public function join(){
$this->result = $this->foo . ' ' . $this->bar;
return $this;
}
public function clear(){
$this->result = '';
return $this;
}
public function result(){
return $this->result;
}
}
$example = new Example();
echo $example->foo('I Love')->bar('coffee.')->join()->result()
//saida: 'I love coffee.'
$join = $example->foo('I Love')->bar('coffee.')->join();
echo $join->clear()->result();
//saída ''