Example #1
0
 /**
  * @return \Closure
  */
 private function getChannelTypeValidator()
 {
     return function ($v) {
         $isExclusiveList = isset($v['type']) ? 'exclusive' === $v['type'] : null;
         $elements = array();
         foreach ($v['elements'] as $element) {
             Configuration::appendChannelTypes($element, $isExclusiveList, $elements);
         }
         return array('type' => $isExclusiveList ? 'exclusive' : 'inclusive', 'elements' => $elements);
     };
 }