コード例 #1
0
ファイル: ci_relaciones.php プロジェクト: emma5021/toba
    function conf__esquema($esquema)
    {
        $dot = "digraph G {\n\t\t\tedge [\tlabelfontcolor=red,\t\n\t\t\t\t\tlabelfloat=false,\n\t\t\t\t\tlabelfontsize=9,\n\t\t\t\t\tarrowhead=none,\n\t\t\t\t\tarrowtail=none];\n\t\t\tnode [\tshape=polygon,\t\n\t\t\t\t\tsides=4\n\t\t\t\t\tcolor=blue];\n";
        $datos = toba_info_editores::get_relaciones_tablas($this->fuente);
        foreach ($datos as $dato) {
            $dot .= '"' . $dato['tabla_1'] . '" -> "' . $dato['tabla_2'] . '" ' . '[headlabel="' . $dato['tabla_2_cols'] . '", taillabel="' . $dato['tabla_1_cols'] . "\"];\n";
        }
        $dot .= '
		}
		';
        //echo $dot;
        return $dot;
    }