private function includeFormatIfNeeded(&$path, &$requirements)
    {
        if (true === $this->includeFormat) {
            $path .= '.{_format}';

            if (!isset($requirements['_format']) && !empty($this->formats)) {
                $requirements['_format'] = implode('|', array_keys($this->formats));
            }
        }
    }
private function includeFormatIfNeeded(&$path, &$requirements)
    {
        if (true === $this->includeFormat) {
            $path .= '.{_format}';

            if (!isset($requirements['_format']) && !empty($this->formats)) {
                $requirements['_format'] = implode('|', array_keys($this->formats));
            }
        }
    }
private function includeFormatIfNeeded ( & $ path , & $ requirements ) { if ( true === $ this -> includeFormat ) { $ path .= '.{_format}' ; if ( ! isset ( $ requirements [ '_format' ] ) && ! empty ( $ this -> formats ) ) { $ requirements [ '_format' ] = implode ( '|' , array_keys ( $ this -> formats ) ) ; } } }
Include the format in the path and requirements if its enabled.

@param string $path
@param array  $requirements
Include the format in the path and requirements if its enabled .