Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ArgumentProcessor.php
Go to the documentation of this file.
1 <?php
7 
12 trait ArgumentProcessor
13 {
20  public function processArguments($arguments)
21  {
22  $output = [];
23  foreach ($arguments as $key => $value) {
24  if (is_array($value)) {
25  $output[$key] = ['A', $value];
26  } elseif (is_int($value)) {
27  $output[$key] = ['I', $value];
28  } elseif (is_bool($value)) {
29  $output[$key] = ['t', $value];
30  } elseif (is_string($value)) {
31  $output[$key] = ['S', $value];
32  } else {
33  throw new \InvalidArgumentException('Unknown argument type ' . gettype($value));
34  }
35  }
36  return $output;
37  }
38 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$value
Definition: gender.phtml:16
$arguments