Esempio n. 1
0
 /**
  * Fetches input data (filering is done later)
  *
  * @param int|Source $source
  * @param Node $node
  * @return mixed
  */
 protected function fetchData($source, Node $node)
 {
     $flags = 0;
     if ($node instanceof Element) {
         if ($node->isMultiple()) {
             $flags |= FILTER_REQUIRE_ARRAY;
         }
     } else {
         $flags |= FILTER_REQUIRE_ARRAY;
     }
     $name = $node->getName();
     return $this->filterInput($source, $name, FILTER_DEFAULT, $flags);
 }