Cake\Upgrade\Shell\Task\SkeletonTask::_process PHP Метод

_process() защищенный Метод

Add missing files and folders in the root app dir.
protected _process ( mixed $path ) : boolean
$path mixed
Результат boolean
    protected function _process($path)
    {
        $path = dirname($path) . DS;
        $dirs = ['logs', 'bin', 'config', 'webroot', 'tests'];
        foreach ($dirs as $dir) {
            if (!is_dir($path . $dir) && empty($this->params['dry-run'])) {
                mkdir($path . DS . $dir, 0770, true);
            }
        }
        if (!is_file($path . 'logs' . DS . 'empty') && empty($this->params['dry-run'])) {
            touch($path . 'logs' . DS . 'empty');
        }
        $sourcePath = ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'app' . DS;
        $files = ['bin' . DS . 'cake', 'bin' . DS . 'cake.bat', 'bin' . DS . 'cake.php', 'phpunit.xml.dist', 'index.php', 'webroot' . DS . 'index.php', 'config' . DS . 'bootstrap.php', 'config' . DS . 'bootstrap_cli.php', 'config' . DS . 'paths.php', 'config' . DS . 'routes.php', 'tests' . DS . 'bootstrap.php', 'src' . DS . 'Template' . DS . 'Error' . DS . 'error400.ctp', 'src' . DS . 'Template' . DS . 'Error' . DS . 'error500.ctp', 'src' . DS . 'Template' . DS . 'Layout' . DS . 'error.ctp', 'src' . DS . 'Controller' . DS . 'PagesController.php'];
        $ret = 0;
        foreach ($files as $file) {
            $ret |= $this->_addFile($file, $sourcePath, $path);
        }
        $ret |= $this->_addFile('config' . DS . 'app.default.php', $sourcePath, $path, 'config' . DS . 'app.default.php');
        return (bool) $ret;
    }