WMarkDown/PHP/ScriptsAnalyzer/WMarkDown.ScriptsAnalyzer.SQL.php

18 lines
635 B
PHP
Executable File

<?php
namespace WMarkDown\ScriptsAnalyzer;
class SQL extends \WMarkDown\Abstracts\ScriptsAnalyzer{
public function analyze($file, $path = null, &$languages = [], $level = 0){
$wmd_path = $this->parent->get_wmd_path($file, $path);
$language = strpos($wmd_path, ".transact.") ? "transact_sql" : (strpos($wmd_path, ".lite.") ? "sql_lite" : "mariadb");
!isset($languages[$language]) && ($languages[$language] = []);
$languages[$language][$i = count($languages[$language])] = ["path" => $wmd_path, "level" => $level, "methods" => []];
}
};