PHP code example of allapps2 / shortcuts
1. Go to this page and download the library: Download allapps2/shortcuts 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/ */
allapps2 / shortcuts example snippets
use Shortcuts\Command\CommandsCollection;
use Shortcuts\IBuilder;
use Shortcuts\Shortcut;
use Shortcuts\ShortcutArg;
use Shortcuts\ShortcutsCollection;
use Shortcuts\ShortcutsCollectionFactory;
class Shortcuts extends ShortcutsCollection
{
function shortcut1(): CommandsCollection
{
return (new CommandsCollection)->add('long command1');
}
#[Shortcut(description: 'Shortcut description')]
function shortcut2(
string $ortcuts::class);
}
};