Nette\DI\Compiler::compile PHP Метод

compile() публичный Метод

public compile ( array $config = NULL, $className = NULL, $parentName = NULL ) : string
$config array
Результат string
    public function compile(array $config = NULL, $className = NULL, $parentName = NULL)
    {
        if (func_num_args()) {
            trigger_error(__METHOD__ . ' arguments are deprecated, use Compiler::addConfig() and Compiler::setClassName().', E_USER_DEPRECATED);
            $this->config = func_get_arg(0) ?: $this->config;
            $this->className = @func_get_arg(1) ?: $this->className;
        }
        $this->processParameters();
        $this->processExtensions();
        $this->processServices();
        $classes = $this->generateCode();
        return implode("\n\n\n", $classes);
    }

Usage Example

 /**
  * @param \Nette\DI\Compiler $compiler
  * @return string
  */
 protected function fixCompile(\Nette\DI\Compiler $compiler)
 {
     $code = $this->compiler->compile();
     if (!is_array($code)) {
         return $code;
     }
     return implode("\n\n\n", $code);
 }
All Usage Examples Of Nette\DI\Compiler::compile