original_string: public function lazySet(array $sets)
      {
          $config = $this->config();
  
          if (!array_key_exists('lazy-set', $config) || !is_array($config['lazy-set'])) {
              throw new \Exception('Config with key "lazy-set" does not exist or incorrect data type given in '.__NAMESPACE__);
          }
          $lazySetConfig = $config['lazy-set'];
          foreach ($sets as $set) {
              if (!array_key_exists($set, $lazySetConfig)) {
                  throw new \Exception('"lazy-set" with name "'.$set.'" does not exist in '.__NAMESPACE__);
              }
          }
          $lazySets = array();
          foreach ($sets as $setIdentifier) {
              $lazySet = $lazySetConfig[$setIdentifier];
              foreach ($lazySet as $type => $set) {
                  if (!is_array($set)) {
                      $lazySet[$type] = $set;
                      continue;
                  }
                  foreach ($set as $index => $attribute) {
                      $deepArray = !in_array($type, $this->deepArrayFalse);
                      $value = $this->configParser($type, $attribute);
                      if (empty($value)) {
                          $value = array();
                      }
                      if ($deepArray) {
                          $lazySet[$type][$index] = $value;
                      } else {
                          $lazySet[$type] = $value;
                      }
                  }
              }
              $lazySets = array_merge_recursive($lazySet, $lazySets);
          }
          return $lazySets;
      }
code: public function lazySet(array $sets)
      {
          $config = $this->config();
  
          if (!array_key_exists('lazy-set', $config) || !is_array($config['lazy-set'])) {
              throw new \Exception('Config with key "lazy-set" does not exist or incorrect data type given in '.__NAMESPACE__);
          }
          $lazySetConfig = $config['lazy-set'];
          foreach ($sets as $set) {
              if (!array_key_exists($set, $lazySetConfig)) {
                  throw new \Exception('"lazy-set" with name "'.$set.'" does not exist in '.__NAMESPACE__);
              }
          }
          $lazySets = array();
          foreach ($sets as $setIdentifier) {
              $lazySet = $lazySetConfig[$setIdentifier];
              foreach ($lazySet as $type => $set) {
                  if (!is_array($set)) {
                      $lazySet[$type] = $set;
                      continue;
                  }
                  foreach ($set as $index => $attribute) {
                      $deepArray = !in_array($type, $this->deepArrayFalse);
                      $value = $this->configParser($type, $attribute);
                      if (empty($value)) {
                          $value = array();
                      }
                      if ($deepArray) {
                          $lazySet[$type][$index] = $value;
                      } else {
                          $lazySet[$type] = $value;
                      }
                  }
              }
              $lazySets = array_merge_recursive($lazySet, $lazySets);
          }
          return $lazySets;
      }
code_tokens: public function lazySet ( array $ sets ) { $ config = $ this -> config ( ) ; if ( ! array_key_exists ( 'lazy-set' , $ config ) || ! is_array ( $ config [ 'lazy-set' ] ) ) { throw new \ Exception ( 'Config with key "lazy-set" does not exist or incorrect data type given in ' . __NAMESPACE__ ) ; } $ lazySetConfig = $ config [ 'lazy-set' ] ; foreach ( $ sets as $ set ) { if ( ! array_key_exists ( $ set , $ lazySetConfig ) ) { throw new \ Exception ( '"lazy-set" with name "' . $ set . '" does not exist in ' . __NAMESPACE__ ) ; } } $ lazySets = array ( ) ; foreach ( $ sets as $ setIdentifier ) { $ lazySet = $ lazySetConfig [ $ setIdentifier ] ; foreach ( $ lazySet as $ type => $ set ) { if ( ! is_array ( $ set ) ) { $ lazySet [ $ type ] = $ set ; continue ; } foreach ( $ set as $ index => $ attribute ) { $ deepArray = ! in_array ( $ type , $ this -> deepArrayFalse ) ; $ value = $ this -> configParser ( $ type , $ attribute ) ; if ( empty ( $ value ) ) { $ value = array ( ) ; } if ( $ deepArray ) { $ lazySet [ $ type ] [ $ index ] = $ value ; } else { $ lazySet [ $ type ] = $ value ; } } } $ lazySets = array_merge_recursive ( $ lazySet , $ lazySets ) ; } return $ lazySets ; }
docstring: Convert lazy-set format to zend-form compatible array format
  
  @param string $id
  @return array
docstring_tokens: Convert lazy - set format to zend - form compatible array format