pdf-finder/src/IO/Input/ArgvAccess.php

19 lines
292 B
PHP
Raw Normal View History

2021-03-23 21:58:40 +01:00
<?php
namespace IO\Input;
trait ArgvAccess
{
protected static function getArguments(): array
{
// Get local copy of $argv
global $argv;
$arguments = $argv;
// Lose the script name
array_shift($arguments);
return $arguments;
}
}