original_string: protected function applyFormats($data)
      {
          if ($this->getOptions()->getOutputFormatters()) {
  
              foreach ($this->getOptions()->getOutputFormatters() as $formatter) {
                  if ($formatter instanceof FormatterInterface) {
                      /** @var $formatter \PageBuilder\FormatterInterface */
                      $data = $formatter->format($data);
                  } elseif (is_callable($formatter)) {
                      $data = $formatter($data, $this->serviceManager);
                  }
              }
          }
  
          return $data;
      }
code: protected function applyFormats($data)
      {
          if ($this->getOptions()->getOutputFormatters()) {
  
              foreach ($this->getOptions()->getOutputFormatters() as $formatter) {
                  if ($formatter instanceof FormatterInterface) {
                      /** @var $formatter \PageBuilder\FormatterInterface */
                      $data = $formatter->format($data);
                  } elseif (is_callable($formatter)) {
                      $data = $formatter($data, $this->serviceManager);
                  }
              }
          }
  
          return $data;
      }
code_tokens: protected function applyFormats ( $ data ) { if ( $ this -> getOptions ( ) -> getOutputFormatters ( ) ) { foreach ( $ this -> getOptions ( ) -> getOutputFormatters ( ) as $ formatter ) { if ( $ formatter instanceof FormatterInterface ) { /** @var $formatter \PageBuilder\FormatterInterface */ $ data = $ formatter -> format ( $ data ) ; } elseif ( is_callable ( $ formatter ) ) { $ data = $ formatter ( $ data , $ this -> serviceManager ) ; } } } return $ data ; }
docstring: Apply formatter using the formatters in the order they were defined
  
  @param $data
  
  @return string
docstring_tokens: Apply formatter using the formatters in the order they were defined