protected function validateRenderer()
    {
        if ($this->renderer === null) {
            $settingsInstance = $this->getSettingsInstance();

            if ($this->type === static::TYPE_EXCEL) {
                $writerClasses = $settingsInstance->getDefaultExcelWriterClasses();
                $rendererClass = $settingsInstance->getDefaultExcelRendererClass();
            } elseif ($this->type === static::TYPE_PDF) {
                $writerClasses = $settingsInstance->getDefaultPDFWriterClasses();
                $rendererClass = $settingsInstance->getDefaultPDFRendererClass();
            } else {
                $writerClasses = $settingsInstance->getDefaultWriterClasses();
                $rendererClass = $settingsInstance->getDefaultRendererClass();
            }

            $writerInstances = [];
            foreach ($writerClasses as $writerClass) {
                $writerInstances[] = new $writerClass();
            }

            $this->renderer = new $rendererClass($writerInstances);
        }
    }
protected function validateRenderer()
    {
        if ($this->renderer === null) {
            $settingsInstance = $this->getSettingsInstance();

            if ($this->type === static::TYPE_EXCEL) {
                $writerClasses = $settingsInstance->getDefaultExcelWriterClasses();
                $rendererClass = $settingsInstance->getDefaultExcelRendererClass();
            } elseif ($this->type === static::TYPE_PDF) {
                $writerClasses = $settingsInstance->getDefaultPDFWriterClasses();
                $rendererClass = $settingsInstance->getDefaultPDFRendererClass();
            } else {
                $writerClasses = $settingsInstance->getDefaultWriterClasses();
                $rendererClass = $settingsInstance->getDefaultRendererClass();
            }

            $writerInstances = [];
            foreach ($writerClasses as $writerClass) {
                $writerInstances[] = new $writerClass();
            }

            $this->renderer = new $rendererClass($writerInstances);
        }
    }
protected function validateRenderer ( ) { if ( $ this -> renderer === null ) { $ settingsInstance = $ this -> getSettingsInstance ( ) ; if ( $ this -> type === static :: TYPE_EXCEL ) { $ writerClasses = $ settingsInstance -> getDefaultExcelWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultExcelRendererClass ( ) ; } elseif ( $ this -> type === static :: TYPE_PDF ) { $ writerClasses = $ settingsInstance -> getDefaultPDFWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultPDFRendererClass ( ) ; } else { $ writerClasses = $ settingsInstance -> getDefaultWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultRendererClass ( ) ; } $ writerInstances = [ ] ; foreach ( $ writerClasses as $ writerClass ) { $ writerInstances [ ] = new $ writerClass ( ) ; } $ this -> renderer = new $ rendererClass ( $ writerInstances ) ; } }
Construct a renderer from setting defaults, if none has been provided.

@return void
Construct a renderer from setting defaults if none has been provided .