', $name, ''; echo '
'; echo '', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ''; echo '
', htmlentities(print_r($data, 1)), '
'; echo '

'; } function listDir() { $dirList = array(); foreach (glob("content/*", GLOB_ONLYDIR) as $dir) { $dirList[basename($dir)] = listFile($dir); } return $dirList; } function listFile($dir) { $fileList = array(); foreach (glob($dir . "/*.md") as $dir) { $fileList[] = str_replace('.md', '', basename($dir)); } return $fileList; } function makeMenu($getDir = null) { $dirList = listDir(); $menu = ''; foreach ($dirList as $dir => $files) { if ($getDir === $dir) { $expand = 'open'; } else { $expand = 'close'; } $menu .= '
' . $dir . '
'; } return $menu; } class ExtendParsedownToc extends ParsedownToc { public function inlineImage($Excerpt) { if (!isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') { return; } $Excerpt['text'] = substr($Excerpt['text'], 1); $Link = $this->inlineLink($Excerpt); if ($Link === null) { return; } $Inline = array( 'extent' => $Link['extent'] + 1, 'element' => array( 'name' => 'img', 'attributes' => array( 'src' => $Link['element']['attributes']['href'], 'alt' => $Link['element']['text'], 'loading' => 'lazy', ), ), ); $Inline['element']['attributes'] += $Link['element']['attributes']; unset($Inline['element']['attributes']['href']); return $Inline; } }