Webmozart\Console\Api\Args\Format\ArgsFormat::getArguments PHP Method

getArguments() public method

Returns all arguments of the format.
public getArguments ( boolean $includeBase = true ) : Argument[]
$includeBase boolean Whether to include arguments of the base format in the result.
return Argument[] The arguments.
    public function getArguments($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
        $arguments = $this->arguments;
        if ($includeBase && $this->baseFormat) {
            // prepend base arguments
            $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
        }
        return $arguments;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Returns all arguments added to the builder.
  *
  * @param bool $includeBase Whether to include arguments of the base format
  *                          in the result.
  *
  * @return Argument[] The arguments.
  */
 public function getArguments($includeBase = true)
 {
     Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
     $arguments = $this->arguments;
     if ($includeBase && $this->baseFormat) {
         // prepend base arguments
         $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
     }
     return $arguments;
 }
All Usage Examples Of Webmozart\Console\Api\Args\Format\ArgsFormat::getArguments