PHP code example of jalsoedesign / cli-clipboard
1. Go to this page and download the library: Download jalsoedesign/cli-clipboard 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/ */
jalsoedesign / cli-clipboard example snippets
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();
// Get the current contents of the clipboard
$contents = $clipboard->get();
// Print the content
echo $contents;
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();
// Set the current contents of the clipboard to "foobar"
$clipboard->set('foobar');
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();
// Clear the current clipboard contents
$clipboard->clear();