PHP code example of php-packages / fluent

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

    

php-packages / fluent example snippets


class A
{

    use \PhpPackages\Fluent\FluentTrait;
}

$a = new A;

$a->should->do->something("useful");
$a->getFluent()->getCalls(); # => ["should", "do", ["something", ["useful"]]]
$a->getFluent()->clearCalls();

$a->_jump_and_scream();
$a->postCatsInInstagram();
$a->getFluent()->getCalls(); # => ["jump", "and", "scream", "post", "cats", "in", "instagram"]
$a->getFluent()->clearCalls();

$a->doThat()->and->doThis(123, null);
$a->getFluent()->getCalls(); # => ["do", "that", "and", "do", ["this", [123, null]]]
shell
composer