Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Attributes
InputValidator Class Reference

Public Member Functions

 __construct (Locale $localeValidator)
 
 validate (InputInterface $input)
 

Static Public Attributes

static $fileExtensionOptionMap
 

Detailed Description

Command input arguments validator class

Definition at line 16 of file InputValidator.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Locale  $localeValidator)

InputValidator constructor

Parameters
Locale$localeValidator

Definition at line 63 of file InputValidator.php.

64  {
65  $this->localeValidator = $localeValidator;
66  }

Member Function Documentation

◆ validate()

validate ( InputInterface  $input)

Validate input options

Parameters
InputInterface$input
Returns
void

Definition at line 74 of file InputValidator.php.

75  {
76  $this->checkAreasInput(
77  $input->getOption(Options::AREA),
78  $input->getOption(Options::EXCLUDE_AREA)
79  );
80  $this->checkThemesInput(
81  $input->getOption(Options::THEME),
82  $input->getOption(Options::EXCLUDE_THEME)
83  );
84  $this->checkLanguagesInput(
85  $input->getArgument(Options::LANGUAGES_ARGUMENT) ?: ['all'],
86  $input->getOption(Options::EXCLUDE_LANGUAGE)
87  );
88  }

Field Documentation

◆ $fileExtensionOptionMap

$fileExtensionOptionMap
static
Initial value:
= [
'js' => Options::NO_JAVASCRIPT,
'map' => Options::NO_JAVASCRIPT,
'css' => Options::NO_CSS,
'less' => Options::NO_LESS,
'html' => Options::NO_HTML,
'htm' => Options::NO_HTML,
'jpg' => Options::NO_IMAGES,
'jpeg' => Options::NO_IMAGES,
'gif' => Options::NO_IMAGES,
'png' => Options::NO_IMAGES,
'ico' => Options::NO_IMAGES,
'svg' => Options::NO_IMAGES,
'eot' => Options::NO_FONTS,
'ttf' => Options::NO_FONTS,
'woff' => Options::NO_FONTS,
'woff2' => Options::NO_FONTS,
'md' => Options::NO_MISC,
'jbf' => Options::NO_MISC,
'csv' => Options::NO_MISC,
'json' => Options::NO_MISC,
'txt' => Options::NO_MISC,
'htc' => Options::NO_MISC,
'swf' => Options::NO_MISC,
'LICENSE' => Options::NO_MISC,
'' => Options::NO_MISC,
]

Definition at line 21 of file InputValidator.php.


The documentation for this class was generated from the following file: