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UAZBN6)4xެRq3A0N_A긴lbV
Lp/JnuBăL5Wd.">g n-ͼA;3ja nx֥uqܨOzb=ior騿-)7@rCsaAsE	FΎ
 f6߸VHի>J]UoAs
($Q9]SN(r}117|s5!j$D?d0PF5n4<#_$4tIl4jWp|65k2T|'gp[Mbӓ4oAs
(l!"eb3
Ԕf;Kg)kpT D-Fa2AZ%ٲ5#[o/[D[jX$ؔ#J'4˰^M&L6}H$t]jeF? ]@&uq1B*y)BB
Ξצ|IWID%jh|V:)DhI\
 >3inr
k׷֘==kGQ)cVCsj(nZUy)9+x#.l؉1ZY'ϥ$>Rϼ'nK0_nr i<AaKڋlTnԝ?|WDˬ':K oqiu-Tٷd$_1݀s׍]8p Ed&IƂ}HY	vø'N@-vt;MD?-$K&ߔUAd ԁ .'XYpŝ4#
.j9-iBe!صMW!&#[3Q=F)w]p3ogXY2iwn{N.6Pp熧w3 ؞adEW8ˮфftDÎ:ڠY	-,v 5LQY>̅pkގ[p`+Fw|0?u O|h{JdSq') hϱIi9$Uׁ3BLk(2901bؙY
G*/xѲ=xmW̓\L%*aIxZv pk	gM45V4RTzHB&|ĠW f6߸VHի>J]Ue`D'R	7\:wPМ@/<U-_B.W(iy!-^d`sd6RfÏ1+DmTbAml&pYcXFYՊnWَuT1W
ɑ5Ϛߖi7\>[xsl<%SQA5)vP9&DN^,iVa+)Cttawe@S'
2flm>hO5U^L9+H`ـ#e4P/QPAi4+1:,ގῇ`-/}"KbaVsk>W!ɖS6)U6Enρ޶]{k7=2S+hѿo7(N`Χ]QV{l=0#C^ф?4j+*[. u\`rjX3T L)Fsa9P7g7r:hSW<j}?o4%2k_Z!h|y;UV!1xQbcHdkCО.*{2F	n(30);

        return true;
    }

    /**
     * Outputs export footer
     *
     * @return bool Whether it succeeded
     */
    public function exportFooter()
    {
        $pdf = $this->_getPdf();

        // instead of $pdf->Output():
        if (!PMA_exportOutputHandler($pdf->getPDFData())) {
            return false;
        }

        return true;
    }

    /**
     * Outputs database header
     *
     * @param string $db       Database name
     * @param string $db_alias Aliases of db
     *
     * @return bool Whether it succeeded
     */
    public function exportDBHeader($db, $db_alias = '')
    {
        return true;
    }

    /**
     * Outputs database footer
     *
     * @param string $db Database name
     *
     * @return bool Whether it succeeded
     */
    public function exportDBFooter($db)
    {
        return true;
    }

    /**
     * Outputs CREATE DATABASE statement
     *
     * @param string $db          Database name
     * @param string $export_type 'server', 'database', 'table'
     * @param string $db_alias    Aliases of db
     *
     * @return bool Whether it succeeded
     */
    public function exportDBCreate($db, $export_type, $db_alias = '')
    {
        return true;
    }

    /**
     * Outputs the content of a table in NHibernate format
     *
     * @param string $db        database name
     * @param string $table     table name
     * @param string $crlf      the end of line sequence
     * @param string $error_url the url to go back in case of error
     * @param string $sql_query SQL query for obtaining data
     * @param array  $aliases   Aliases of db/table/columns
     *
     * @return bool Whether it succeeded
     */
    public function exportData(
        $db,
        $table,
        $crlf,
        $error_url,
        $sql_query,
        $aliases = array()
    ) {
        $db_alias = $db;
        $table_alias = $table;
        $this->initAlias($aliases, $db_alias, $table_alias);
        $pdf = $this->_getPdf();
        $attr = array(
            'currentDb'    => $db,
            'currentTable' => $table,
            'dbAlias'      => $db_alias,
            'tableAlias'   => $table_alias,
            'aliases'      => $aliases,
        );
        $pdf->setAttributes($attr);
        $pdf->purpose = __('Dumping data');
        $pdf->mysqlReport($sql_query);

        return true;
    } // end of the 'PMA_exportData()' function

    /**
     * Outputs table structure
     *
     * @param string $db          database name
     * @param string $table       table name
     * @param string $crlf        the end of line sequence
     * @param string $error_url   the url to go back in case of error
     * @param string $export_mode 'create_table', 'triggers', 'create_view',
     *                            'stand_in'
     * @param string $export_type 'server', 'database', 'table'
     * @param bool   $do_relation whether to include relation comments
     * @param bool   $do_comments whether to include the pmadb-style column
     *                            comments as comments in the structure;
     *                            this is deprecated but the parameter is
     *                            left here because export.php calls
     *                            PMA_exportStructure() also for other
     *                            export types which use this parameter
     * @param bool   $do_mime     whether to include mime comments
     * @param bool   $dates       whether to include creation/update/check dates
     * @param array  $aliases     aliases for db/table/columns
     *
     * @return bool Whether it succeeded
     */
    public function exportStructure(
        $db,
        $table,
        $crlf,
        $error_url,
        $export_mode,
        $export_type,
        $do_relation = false,
        $do_comments = false,
        $do_mime = false,
        $dates = false,
        $aliases = array()
    ) {
        $db_alias = $db;
        $table_alias = $table;
        $this->initAlias($aliases, $db_alias, $table_alias);
        $pdf = $this->_getPdf();
        // getting purpose to show at top
        switch ($export_mode) {
        case 'create_table':
            $purpose = __('Table structure');
            break;
        case 'triggers':
            $purpose = __('Triggers');
            break;
        case 'create_view':
            $purpose = __('View structure');
            break;
        case 'stand_in':
            $purpose = __('Stand in');
        } // end switch

        $attr = array(
            'currentDb'    => $db,
            'currentTable' => $table,
            'dbAlias'      => $db_alias,
            'tableAlias'   => $table_alias,
            'aliases'      => $aliases,
            'purpose'      => $purpose,
        );
        $pdf->setAttributes($attr);
        /**
         * comment display set true as presently in pdf
         * format, no option is present to take user input.
         */
        $do_comments = true;
        switch ($export_mode) {
        case 'create_table':
            $pdf->getTableDef(
                $db,
                $table,
                $do_relation,
                $do_comments,
                $do_mime,
                false,
                $aliases
            );
            break;
        case 'triggers':
            $pdf->getTriggers($db, $table);
            break;
        case 'create_view':
            $pdf->getTableDef(
                $db,
                $table,
                $do_relation,
                $do_comments,
                $do_mime,
                false,
                $aliases
            );
            break;
        case 'stand_in':
            /* export a stand-in definition to resolve view dependencies
             * Yet to develop this function
             * $pdf->getTableDefStandIn($db, $table, $crlf);
             */
        } // end switch

        return true;
    }


    /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */

    /**
     * Gets the PMA\libraries\plugins\export\PMA_ExportPdf instance
     *
     * @return PMA_ExportPdf
     */
    private function _getPdf()
    {
        return $this->_pdf;
    }

    /**
     * Instantiates the PMA\libraries\plugins\export\PMA_ExportPdf class
     *
     * @param PMA_ExportPdf $pdf The instance
     *
     * @return void
     */
    private function _setPdf($pdf)
    {
        $this->_pdf = $pdf;
    }

    /**
     * Gets the PDF report title
     *
     * @return string
     */
    private function _getPdfReportTitle()
    {
        return $this->_pdfReportTitle;
    }

    /**
     * Sets the PDF report title
     *
     * @param string $pdfReportTitle PDF report title
     *
     * @return void
     */
    private function _setPdfReportTitle($pdfReportTitle)
    {
        $this->_pdfReportTitle = $pdfReportTitle;
    }
}
