original_string: protected function getCountersRecursive($objFields, $objCollection = null)
      {
          if (is_null($objCollection)) {
              $objCollection = new Collection();
          }
  
          foreach ($objFields as $objField) {
              if ($objField instanceof Element && $objField->isDynamicCounter()) {
                  $objCollection->addObject($objField);
              }
  
              if ($objField->hasFields()) {
                  $this->getCountersRecursive($objField->getFields(), $objCollection);
              }
          }
  
          return $objCollection;
      }
code: protected function getCountersRecursive($objFields, $objCollection = null)
      {
          if (is_null($objCollection)) {
              $objCollection = new Collection();
          }
  
          foreach ($objFields as $objField) {
              if ($objField instanceof Element && $objField->isDynamicCounter()) {
                  $objCollection->addObject($objField);
              }
  
              if ($objField->hasFields()) {
                  $this->getCountersRecursive($objField->getFields(), $objCollection);
              }
          }
  
          return $objCollection;
      }
code_tokens: protected function getCountersRecursive ( $ objFields , $ objCollection = null ) { if ( is_null ( $ objCollection ) ) { $ objCollection = new Collection ( ) ; } foreach ( $ objFields as $ objField ) { if ( $ objField instanceof Element && $ objField -> isDynamicCounter ( ) ) { $ objCollection -> addObject ( $ objField ) ; } if ( $ objField -> hasFields ( ) ) { $ this -> getCountersRecursive ( $ objField -> getFields ( ) , $ objCollection ) ; } } return $ objCollection ; }
docstring: Get a collection of fields and look for dynamic counters recursively
  @param Collection $objFields
  @param Collection $objCollection
  @return Collection
docstring_tokens: Get a collection of fields and look for dynamic counters recursively