getInternalKernelPath() public method

Resolves the path to the source kernel files of the backend
public getInternalKernelPath ( ) : string
return string Absolute path to kernel files
Exemplo n.º 1
0
 /**
  * Checks which files in the base kernel must be copied
  *
  * @return boolean
  */
 protected function checkKernelFiles()
 {
     $kernelPath = "ext/kernel";
     if (!file_exists($kernelPath)) {
         $kernelDone = mkdir($kernelPath, 0775, true);
         if (!$kernelDone) {
             throw new Exception("Cannot create kernel directory");
         }
     }
     $kernelPath = realpath($kernelPath);
     $sourceKernelPath = $this->backend->getInternalKernelPath();
     $configured = $this->recursiveProcess($sourceKernelPath, $kernelPath, '@.*\\.[ch]$@', array($this, 'checkKernelFile'));
     if (!$configured) {
         $this->logger->output('Copying new kernel files...');
         $this->recursiveDeletePath($kernelPath, '@^.*\\.[lcho]$@');
         @mkdir($kernelPath);
         $this->recursiveProcess($sourceKernelPath, $kernelPath, '@^.*\\.[ch]$@');
     }
     return !$configured;
 }