ZBlogException::get_code PHP Method

get_code() public method

获取出错代码信息
public get_code ( $file, $line ) : array
$file
$line
return array
    public function get_code($file, $line)
    {
        if (strcasecmp($file, 'Unknown') == 0) {
            return array();
        }
        if (!is_readable($file)) {
            return array();
        }
        $aFile = array_slice(file($file), max(0, $line - 5), 10, true);
        foreach ($aFile as &$sData) {
            //&$ = ByRef
            $sData = htmlspecialchars($sData);
        }
        return $aFile;
    }