PHP code example of transprime-research / functions-proxy-linker

1. Go to this page and download the library: Download transprime-research/functions-proxy-linker 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/ */

    

transprime-research / functions-proxy-linker example snippets


Piper::on('I am ok')
    ->strlen() // 7
    ->in_array([1, 4, 7, 5]) // true
    ->up(); // true

Linker::on(PiperLinker::class) // the class to populate with functions
    ->skipFirstParameter() // So that we can use them as a chained and piped methods
    ->link()
    ->save('/dir/piper/PiperLinker.php');

Linker::on(LinkerStubber::class) // the class to populate with functions
    ->link()
    ->save('/dir/stub/LinkerStubber.php');

/**
 * ...
 * @method self is_array($value)
 * @method self in_array($needle, array $haystack, bool $strict = false)
 */
class LinkerStubber
{

}

Linker::on(LinkerStubber::class) // the class to populate with functions
    ->link(['is_array'])
    ->save('/dir/stub/LinkerStubber.php');
// is_array will not appear int the final generated code.