keys.php

<?php
return array (
  'Regex.infoArray' => '$info = [
    \'matchList\'=>$matches, // Array of all matches
    \'lineStart\' => -1, // (not implemented, @TODO) Line in file/text that your match starts on
    \'lineEnd\' => -1,   // (not implemented, @TODO) Line in file/text that your match ends on
    \'text\' => $text,   //
    \'regIndex\' => null,
];',
  'Technical.deleteExistingDocs.sanityCheck' => 'if (!$dryRun&&$this->configs[\'deleteExistingDocs\'][0]===true){
    $root = $this->rootDir;
    $root = realpath($root);
    $docsDir = $this->rootDir.\'/\'.$this->configs[\'dir.docs\'][0];
    $docsDir = realpath($docsDir);

    // To avoid removing things like /home/user/ and /var/www/ or shorter paths
    // My assumption for shortest path is: /home/user/asubdir/projectdirs
    // Projects COULD be at /home/user/projectdir, but mine likely never will be... & I think that seems silly.
    // I expect Windows to have even longer base paths?
    $rootSlashArray = explode(\'/\', str_replace(\'\\\\\', \'/\', $root));
    $docSlashArray = explode(\'/\', str_replace(\'\\\\\',\'/\', $docsDir));
    if (strlen($docsDir)>strlen($root)
        && $root!=\'\'
        && count($rootSlashArray)>3
        && count($docSlashArray) > count($rootSlashArray)
        && strpos($docsDir, $root)===0
    ) {
        \\Tlf\\Scrawl\\Utility::DANGEROUS_removeNonEmptyDirectory($docsDir);
    }
}',
  'Configs.defaultsCode' => 'protected function inferDefaultOptions(){
    $defaults = [];
    $src = $this->pwd;

    if (is_dir($src.\'/docs\'))$defaults[\'dir.docs\'] = \'docs\';
    else if (is_dir($src.\'/doc\'))$defaults[\'dir.docs\'] = \'doc\';
    else $defaults[\'dir.docs\'] = \'doc\';

    if (is_dir($src.\'/docs-src\'))$defaults[\'dir.template\'] = \'docs-src\';
    else if (is_dir($src.\'/doc-src\'))$defaults[\'dir.template\'] = \'doc-src\';
    else $defaults[\'dir.template\'] = \'docs-src\';

    if (is_dir($src.\'/src\'))$defaults[\'dir.code\'] = \'src\';
    else if (is_dir($src.\'/code\'))$defaults[\'dir.code\'] = \'code\';
    else $defaults[\'dir.code\'] = \'src\';

    if (is_file($src.\'/.config/scrawl.json\')){
        $defaults[\'file.conf\'] = \'.config/scrawl.json\';
    } else if (is_file($src.\'/.scrawl.json\')){
        $defaults[\'file.conf\'] = \'.scrawl.json\';
    } else {
        $defaults[\'file.conf\'] = \'.config/scrawl.json\';
    }

    $defaults[\'file.code.ext\'] = \'*\';

    $defaults[\'file.template.ext\'] = \'.src.md\';

    $defaults[\'deleteExistingDocs\'] = false;

    $defaults[\'markdown.preserveNewLines\'] = true;
    $defaults[\'markdown.prependGenNotice\'] = true;

    $defaults[\'scrawl.ext\'] = [];

    $defaults[\'autoload\'] = [\'classmap\'=>[]];

    $defaults[\'readme.copyFromDocs\'] = true;

    $defaults[\'ext.PhpApiScraper\'] = true;

    return $defaults;
}',
  'Regex.invoke' => 'public function onSourceFileFound($file){
    $this->match(\'WrappedGenericBlock\',$file->content());
}',
  'Test.GeneralTest' => 'The GeneralTest class handles most tests of this library. This key is here purely to test the @export feature',
  'Test.GeneralTest.testKeysExported' => 'This is a docblock export, here for testing purposes.',
  'Example.DocBlockExport' => '/**
 * This is a docblock export, here for testing purposes.
 * @export(Test.GeneralTest.testKeysExported)
 */',
  'Configs.list' => '
- dir.docs: `docs` or `doc` or `doc`
- dir.template: `docs-src` or `doc-src` or `docs-src`
- dir.code: `src` or `code` or `src`
- file.conf: `.config/scrawl.json` or `.scrawl.json` or `.config/scrawl.json`
- file.code.ext: `*`
- file.template.ext: `.src.md`
- deleteExistingDocs: `false`
- markdown.preserveNewLines: `true`
- markdown.prependGenNotice: `true`
- scrawl.ext: `[]`
- readme.copyFromDocs: `true`
- ext.PhpApiScraper: `true`',
  'Extensions.EventsList' => '
### File code/Scrawl.php
- Group: default, Method: onBuildStart, Calling Line: `$this->extCall(\'default\', \'onBuildStart\');`  
- Group: default, Method: onFileListPrepared, Calling Line: `$this->extCall(\'default\', \'onFileListPrepared\', $codeFiles);`  
- Group: default, Method: onSourceFileFound, Calling Line: `$this->extCall(\'default\', \'onSourceFileFound\', $cf);`  
- Group: default, Method: onSourceFilesDone, Calling Line: `$this->extCall(\'default\', \'onSourceFilesDone\');`  
- Group: default, Method: onTemplatesListPrepared, Calling Line: `$this->extCall(\'default\', \'onTemplatesListPrepared\', $templateFiles);`  
- Group: default, Method: onTemplateFileFound, Calling Line: `$this->extCall(\'default\', \'onTemplateFileFound\', $tf);`  
- Group: default, Method: onPreWriteFiles, Calling Line: `$this->extCall(\'default\', \'onPreWriteFiles\');`  
- Group: default, Method: onWillWriteFile, Calling Line: `$this->extCall(\'default\', \'onWillWriteFile\', $of);`  
',
  'Extensions.CustomCall' => '
### File code/Extension/Global/ExportDocBlock.php
- Group: docblock, Method: n/a, Calling Line: `foreach ($this->scrawl->getExtensions(\'docblock\') as $callable){`  
',
)
?>