golden hour
/opt/PHP-Antimalware-Scanner/src/Console
⬆️ Go Up
Upload
File/Folder
Size
Actions
Argument.php
1.17 KB
Del
OK
Argv.php
9.58 KB
Del
OK
CLI.php
16.49 KB
Del
OK
Figlet.php
5.06 KB
Del
OK
Flag.php
1.57 KB
Del
OK
Fonts
-
Del
OK
Edit: Flag.php
<?php /** * PHP Antimalware Scanner. * * @author Marco Cesarato <cesarato.developer@gmail.com> * @license http://opensource.org/licenses/gpl-3.0.html GNU Public License * * @see https://github.com/marcocesarato/PHP-Antimalware-Scanner */ namespace AMWScan\Console; /** * Class Flag. */ class Flag { /** * @var string */ public $name; /** * @var null */ public $callback; /** * @var array */ public $aliases = []; /** * @var bool */ public $hasValue = false; /** * @var string */ public $valueName; public $defaultValue; public $var; public $help; /** * Flag constructor. * * @param array $options * @param null $callback */ public function __construct($name, $options = [], $callback = null) { $this->name = $name; $this->callback = $callback; $this->aliases = array_merge(["--$name"], (array)@$options['alias']); $this->defaultValue = @$options['default']; $this->hasValue = (bool)@$options['has_value']; $this->valueName = @$options['value_name']; $this->help = @$options['help']; if (array_key_exists('var', $options)) { $this->var = &$options['var']; } } /** * @return string */ public function __toString() { $s = implode('|', $this->aliases); if ($this->hasValue) { $name = empty($this->valueName) ? $this->name : $this->valueName; $s = "$s <{$name}>"; } return "[$s]"; } }
Save