Plugin Directory

Changeset 3156914


Ignore:
Timestamp:
09/24/2024 12:23:50 PM (19 months ago)
Author:
firmafy
Message:

Update to version 1.3.0 from GitHub

Location:
firmafy
Files:
698 added
4 deleted
36 edited
1 copied

Legend:

Unmodified
Added
Removed
  • firmafy/tags/1.3.0/firmafy.php

    r3081802 r3156914  
    44 * Plugin URI:  https://firmafy.com
    55 * Description: Validate legally your forms in WordPress.
    6  * Version:     1.2.1
     6 * Version:     1.3.0
    77 * Author:      Firmafy
    88 * Author URI:  https://firmafy.com
     
    2424defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
    2525
    26 define( 'FIRMAFY_VERSION', '1.2.1' );
     26define( 'FIRMAFY_VERSION', '1.3.0' );
    2727define( 'FIRMAFY_PLUGIN', __FILE__ );
    2828define( 'FIRMAFY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     
    5454if ( ( is_plugin_active( 'gravityforms/gravityforms.php' ) || is_plugin_active( 'gravity-forms/gravityforms.php' ) ) && ! class_exists( 'FIRMAFY_Bootstrap' ) ) {
    5555    add_action( 'gform_loaded', array( 'FIRMAFY_Bootstrap', 'load' ), 5 );
     56    /**
     57     * Firmafy Bootstrap
     58     */
    5659    class FIRMAFY_Bootstrap {
    57 
     60        /**
     61         * Load the plugin after Gravity Forms
     62         *
     63         * @return void
     64         */
    5865        public static function load() {
    5966
     
    6875    }
    6976
     77    /**
     78     * Get an instance of the Firmafy class
     79     *
     80     * @return GFFirmafy
     81     */
    7082    function gf_firmafy() {
    7183        return GFFirmafy::get_instance();
  • firmafy/tags/1.3.0/includes/assets/admin.css

    r3050518 r3156914  
    6464}
    6565
     66.firmafy-upload-btn {
     67    margin-top: 10px !important;
     68}
     69
     70@media( min-width: 768px ) {
     71    .firmafy-upload-btn {
     72        margin-left: 5px !important;
     73        margin-top: 0 !important;
     74    }
     75}
     76
    6677/* Tablet vertical */
    6778@media only screen and (max-width: 860px) {
  • firmafy/tags/1.3.0/includes/class-firmafy-admin-settings.php

    r3050518 r3156914  
    5858            array(),
    5959            FIRMAFY_VERSION
     60        );
     61
     62        wp_register_script(
     63            'firmafy-admin-js',
     64            FIRMAFY_PLUGIN_URL . '/includes/assets/admin.js',
     65            array(),
     66            FIRMAFY_VERSION,
     67            true
    6068        );
    6169    }
     
    237245
    238246        add_settings_field(
     247            'firmafy_line_height',
     248            __( 'Line heigth', 'firmafy' ),
     249            array( $this, 'firmafy_line_height_callback' ),
     250            'firmafy_options',
     251            'admin_firmafy_settings'
     252        );
     253
     254        add_settings_field(
     255            'firmafy_pdf_font',
     256            __( 'PDF Font', 'firmafy' ),
     257            array( $this, 'firmafy_pdf_font_callback' ),
     258            'firmafy_options',
     259            'admin_firmafy_settings'
     260        );
     261
     262        add_settings_field(
     263            'firmafy_pdf_background',
     264            __( 'PDF image background', 'firmafy' ),
     265            array( $this, 'firmafy_pdf_background_callback' ),
     266            'firmafy_options',
     267            'admin_firmafy_settings'
     268        );
     269
     270        add_settings_field(
     271            'firmafy_pdf_logo',
     272            __( 'PDF logo image', 'firmafy' ),
     273            array( $this, 'firmafy_pdf_logo_callback' ),
     274            'firmafy_options',
     275            'admin_firmafy_settings'
     276        );
     277
     278        add_settings_field(
    239279            'firmafy_signers',
    240280            __( 'Signers by default', 'firmafy' ),
     
    325365        }
    326366
     367        if ( isset( $input['line_height'] ) ) {
     368            $sanitary_values['line_height'] = sanitize_text_field( $input['line_height'] );
     369        }
     370
     371        if ( isset( $input['pdf_font'] ) ) {
     372            $sanitary_values['pdf_font'] = sanitize_text_field( $input['pdf_font'] );
     373        }
     374
     375        if ( isset( $_POST['pdf_background'] ) ) {
     376            $sanitary_values['pdf_background'] = sanitize_text_field( $_POST['pdf_background'] );
     377        }
     378
     379        if ( isset( $_POST['pdf_logo'] ) ) {
     380            $sanitary_values['pdf_logo'] = sanitize_text_field( $_POST['pdf_logo'] );
     381        }
     382
    327383        // Save Signers options.
    328384        if ( isset( $input['signers'] ) ) {
     
    408464        echo checked( in_array( 'email', $notification, true ), 1 ) . ' />';
    409465        echo '<label for="notification">Email</label>';
     466    }
     467
     468    /**
     469     * Line height callback.
     470     *
     471     * @return void
     472     */
     473    public function firmafy_line_height_callback() {
     474        printf(
     475            '<input placeholder="%s" class="regular-text" type="text" name="firmafy_options[line_height]" id="line_height" value="%s"> (in pixels)',
     476            __( 'Default: 16px', 'firmafy' ),
     477            isset( $this->firmafy_settings['line_height'] ) ? esc_attr( $this->firmafy_settings['line_height'] ) : ''
     478        );
     479    }
     480
     481    /**
     482     * PDF Font callback.
     483     *
     484     * @return void
     485     */
     486    public function firmafy_pdf_font_callback() {
     487        global $helpers_firmafy;
     488
     489        // Get all fonts.
     490        $fonts = $helpers_firmafy->get_available_pdf_fonts();
     491
     492        echo '<select class="regular-text" name="firmafy_options[pdf_font]" id="pdf_font">';
     493        foreach ( $fonts as $font ) {
     494            echo '<option value="' . esc_html( $font ) . '" ';
     495            selected( $font, isset( $this->firmafy_settings['pdf_font'] ) ? $this->firmafy_settings['pdf_font'] : '' );
     496            echo '>' . esc_html( $font ) . '</option>';
     497        }
     498        echo '</select>';
     499    }
     500
     501    /**
     502     * PDF Background callback.
     503     *
     504     * @return void
     505     */
     506    public function firmafy_pdf_background_callback() {
     507        global $helpers_firmafy;
     508
     509        wp_enqueue_script( 'firmafy-admin-js' );
     510        wp_enqueue_media();
     511
     512        echo '<input class="regular-text" type="text" name="pdf_background" id="pdf_background" value="' . esc_attr( $this->firmafy_settings['pdf_background'] ) . '">';
     513        echo '<div class="js-firmafy-upload-file button firmafy-upload-btn">' . esc_html( 'Upload', 'firmafy ') . '</div>';
     514    }
     515
     516    /**
     517     * PDF Logo callback.
     518     *
     519     * @return void
     520     */
     521    public function firmafy_pdf_logo_callback() {
     522        wp_enqueue_script( 'firmafy-admin-js' );
     523        wp_enqueue_media();
     524
     525        echo '<input class="regular-text" type="text" name="pdf_logo" id="pdf_logo" value="' . esc_attr( $this->firmafy_settings['pdf_logo'] ) . '">';
     526        echo '<div class="js-firmafy-upload-logo-file button firmafy-upload-btn">' . esc_html( 'Upload', 'firmafy ') . '</div>';
    410527    }
    411528
  • firmafy/tags/1.3.0/includes/class-helpers-firmafy.php

    r3081802 r3156914  
    1313require FIRMAFY_PLUGIN_PATH . '/vendor/autoload.php';
    1414
    15 use Spipu\Html2Pdf\Html2Pdf;
    16 
     15use Dompdf\Dompdf;
     16use Dompdf\Options;
    1717/**
    1818 * Class Firmafy.
     
    2323 */
    2424class Helpers_Firmafy {
     25
     26    /**
     27     * Available PDF Fonts
     28     *
     29     * @var array
     30     */
     31    public $available_pdf_fonts;
     32
     33    /**
     34     * Constructor
     35     */
     36    public function __construct() {
     37        // Add the available_pdf_fonts.
     38        $this->available_pdf_fonts = array(
     39            'roboto'       => 'Roboto',
     40            'courier'      => 'Courier',
     41            'times'        => 'Times',
     42            'zapfdingbats' => 'ZapfDingbats',
     43        );
     44    }
     45
    2546    /**
    2647     * POSTS API from Firmafy
     
    173194     * Filter signers from feed meta
    174195     *
    175      * @param array $meta
    176      * @return void
     196     * @param array $meta Meta to filter.
     197     * @return array
    177198     */
    178199    public function filter_signers( $meta ) {
     
    190211     * Get Firmafy Templates
    191212     *
     213     * @param integer $template_id Template ID.
    192214     * @return array
    193215     */
    194216    public function get_variables_template( $template_id ) {
    195         $fields   = array();
    196         $template = get_post( $template_id );
     217        $fields              = array();
     218        $template            = get_post( $template_id );
    197219        $required_api_fields = array(
    198220            'nombre',
     
    202224        );
    203225
    204         preg_match_all( '#\{(.*?)\}#', $template->post_content, $matches);
     226        preg_match_all( '#\{(.*?)\}#', $template->post_content, $matches );
    205227        if ( ! empty( $matches[1] ) && is_array( $matches[1] ) ) {
    206228            foreach ( $matches[1] as $field ) {
     
    210232            }
    211233            $fields_to_convert = array_unique( array_merge( $fields, $required_api_fields ) );
    212             $fields   = array();
     234            $fields           = array();
    213235            foreach ( $fields_to_convert as $field ) {
    214236                $fields[] = array(
     
    225247     * Shows is field is required
    226248     *
    227      * @param array $field
     249     * @param array $field Field to check.
    228250     * @return boolean
    229251     */
     
    237259
    238260    /**
    239      * detects strange string
    240      *
    241      * @param [type] $string
     261     * Detects strange string
     262     *
     263     * @param string $string String to check.
    242264     * @return boolean
    243265     */
     
    255277            return false;
    256278        }
     279        if ( false !== strpos( $string, 'salto_pagina' ) ) {
     280            return false;
     281        }
    257282        if ( false !== strpos( $string, ':' ) ) {
    258283            return false;
     
    267292     * @param array   $merge_vars Merge Vars.
    268293     * @param array   $force_signers Second Signers.
     294     * @param integer $entry_id Entry ID.
    269295     * @param boolean $add_header Add Header.
    270296     *
    271297     * @return array
    272298     */
    273     public function create_entry( $template_id, $merge_vars, $force_signers = array(), $add_header = false ) {
     299    public function create_entry( $template_id, $merge_vars, $force_signers = array(), $entry_id = null, $add_header = false ) {
    274300        $settings         = get_option( 'firmafy_options' );
    275301        $id_show          = isset( $settings['id_show'] ) ? $settings['id_show'] : '';
    276         $font             = isset( $settings['font'] ) ? $settings['font'] : 'helvetica';
     302        $font             = isset( $settings['pdf_font'] ) ? strtolower( $settings['pdf_font'] ) : 'helvetica';
     303        $pdf_background   =  isset( $settings['pdf_background'] ) ? $settings['pdf_background'] : '';
    277304        $signer           = array();
    278305        $temp_content_pre = '';
     
    287314            $company_signers = $settings['signers'];
    288315
    289             // Check duplicated signers.
     316            // Check duplicated signers.ƒ
    290317            if ( ! empty( $force_signers ) ) {
    291318                $delete = array_diff( array_column( $company_signers, 'nif' ), $force_signers );
     
    322349
    323350        foreach ( $merge_vars as $variable ) {
    324             if ( ! empty( $variable['name'] ) ) {
     351            if ( isset( $variable['name'] ) ) {
    325352                $value            = is_array( $variable['value'] ) ? implode( ', ', $variable['value'] ) : $variable['value'];
    326353                $template_content = str_replace( '{' . $variable['name'] . '}', $value, $template_content );
     
    335362        $signer['type_notifications'] = implode( ',', $notification );
    336363
    337         $template_content = $this->replace_tags( $template_content, $template_id );
     364        // Replace tags.
     365        $template_content = $this->replace_tags( $template_content, $template_id, $entry_id );
     366
     367        // Process images.
     368        $template_content = $this->process_images( $template_content );
    338369
    339370        // Generates PDF.
    340         $filename = 'firmafy-' . sanitize_title( get_bloginfo( 'name' ) ) . '-' . gmdate( 'Y-m-d-H-i' ) . '.pdf';
    341 
    342         $content  = '<page style="margin-top:10mm;" backcolor="#fff">';
     371        $filename  = 'firmafy-' . sanitize_title( get_bloginfo( 'name' ) );
     372        $filename .= '-' . sanitize_title( get_the_title( $template_id ) );
     373        $filename .= '-' . gmdate( 'Y-m-d-H-i' ) . '.pdf';
     374
     375        $content  = '<html>';
     376        $content .= '<head>';
    343377        $content .= '<style>';
     378
     379        // Prepare Font family tag ready to replace.
     380        $body_replace_tags = array(
     381            'font-family: "{{fontFamily}}", sans-serif !important;',
     382        );
     383
     384        // Prepare for the PDF background.
     385        if ( ! empty( $pdf_background ) ) {
     386            $body_replace_tags[] = 'background-image: url(' . $pdf_background . '); background-size: cover;  background-position: center; background-repeat: no-repeat;';
     387        }
     388
     389        // Append the body CSS.
     390        $content .= 'body { ' . implode( ' ', $body_replace_tags ) . ' }';
     391
    344392        // Gets Template Style.
    345393        $template_css_file = get_template_directory() . '/style.css';
     
    347395            $content .= file_get_contents( $template_css_file );
    348396        }
     397       
    349398        // Gets Template Child Style.
    350399        $template_css_file = get_stylesheet_directory() . '/style.css';
     
    353402        }
    354403
     404        // Gets the custom PDF styles.
     405        $template_pdf_css_file = FIRMAFY_PLUGIN_PATH . 'assets/pdf.css';
     406        if ( file_exists( $template_pdf_css_file ) ) {
     407            $content .= file_get_contents( $template_css_file );
     408        }
     409
     410        // Get the Gutenberg styles.
     411        $content .= $this::get_gutenberg_css();
     412
     413        // Append the line height to the style (only for p tags).
     414        $line_height = ! empty( $settings['line_height'] ) ? $settings['line_height'] : '16';
     415
     416        $content .= 'p.firmafy-lh { line-height: ' . $line_height . 'px; }';
    355417        $content .= '</style>';
     418        $content .= '</head>';
     419        $content .= '<body>';
    356420        $content .= $template_content;
    357         $content .= '</page>';
     421        $content .= '</body>';
     422        $content .= '</html>';
    358423
    359424        // Creates PDF.
    360         $lang = isset( explode( '_', get_locale() )[0] ) ? explode( '_', get_locale() )[0] : 'en';
    361425        try {
    362             $html2pdf  = new Html2Pdf(
    363                 'P',
    364                 'A4',
    365                 $lang,
    366                 true,
    367                 'UTF-8',
    368                 array( 10, 10, 10, 10 ) // in mm.
    369             );
    370             $html2pdf->addFont( $font );
    371             $html2pdf->setDefaultFont( $font );
    372             $html2pdf->setTestTdInOnePage( false );
    373             $html2pdf->writeHTML( $content );
    374             $pdf_content = $html2pdf->Output( $filename, 'S' );
    375         } catch ( Html2PdfException $e ) { //phpcs:ignore
    376             $formatter = new ExceptionFormatter( $e ); //phpcs:ignore
    377             error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $formatter->getHtmlMessage() );
     426            // Define the options.
     427            $options = new Options();
     428            $options->set( 'isHtml5ParserEnabled', true ); // Enable HTML5 parser.
     429            $options->set( 'isRemoteEnabled', true ); // Enable remote file access.
     430            $options->set( 'isFontSubsettingEnabled', true );
     431
     432            // Initialize the Dompdf instance.
     433            $dompdf = new Dompdf( $options );
     434
     435            // Check if selected font is custom or not. If is custom, we must add the full path.
     436            if ( $this::font_is_custom( $font ) ) {
     437                $custom_font = self::get_custom_pdf_font( $font );
     438
     439                if ( ! empty( $custom_font ) ) {
     440                    foreach( $custom_font as $pdf_font ) {
     441                        $dompdf->getFontMetrics()->registerFont( $pdf_font[0], $pdf_font[1] );
     442                    }
     443                } else {
     444                    $font = 'helvetica';
     445                }
     446            }
     447           
     448            // Set the font.
     449            $content = str_replace( '{{fontFamily}}', ucfirst( $font ), $content );
     450
     451            // Setup the paper size and orientation.
     452            $dompdf->setPaper( 'A4', 'portrait' );
     453
     454            // Load HTML content.
     455            $dompdf->loadHtml( $content );
     456
     457            // Render the HTML to PDF.
     458            $dompdf->render();
     459
     460            // Check if logo is configured.
     461            $logo_path = ! empty( $settings['pdf_logo'] )
     462                ? $this::attachment_url_to_path( $settings['pdf_logo'] )
     463                : '';
     464
     465            if ( $logo_path ) {
     466                $dompdf->getCanvas()->page_script( function ( $pageNumber, $pageCount, $canvas, $fontMetrics ) use ( $logo_path ) {
     467                    if ( file_exists( $logo_path ) ) {
     468                        $canvas->image( $logo_path, 30, 10, 100, 18 );
     469                    }
     470                });
     471            }
     472
     473            // Output the generated PDF.
     474            $pdf_content = $dompdf->output();
     475        } catch ( Exception $e ) { //phpcs:ignore
     476            error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $e->getMessage() );
    378477        }
    379478
     
    390489            'pdf_base64' => chunk_split( base64_encode( $pdf_content ) ),
    391490        );
     491
    392492        $result_api = $this->api_post( $settings, 'request', $query );
    393493
    394494        if ( 'error' === $result_api['status'] ) {
    395495            $result_api['message'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
    396         }
     496        } else {
     497            $result_api['id'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
     498        }
     499
    397500        return $result_api;
    398501    }
     
    423526     * Replaces variables in document with allowed tags and core variables
    424527     *
    425      * @param string $content  Content to replace
    426      * @param integer $post_id Reference post
     528     * @param string  $content Content to replace.
     529     * @param integer $post_id Reference post.
     530     * @param integer $entry_id Entry ID.
     531     *
    427532     * @return string
    428533     */
    429     private function replace_tags( $content, $post_id ) {
     534    private function replace_tags( $content, $post_id, $entry_id = null ) {
    430535        $months = array(
    431536            1  => __( 'January', 'firmafy' ),
     
    451556
    452557        // Replace date.
    453         $content = str_replace( '{fecha}', date( 'd-m-Y' ), $content );
     558        $content = str_replace( '{fecha}', gmdate( 'd-m-Y' ), $content );
     559
     560        if ( ! empty( $entry_id ) ) {
     561            $content = str_replace( '{referencia}', $entry_id, $content );
     562        }
    454563
    455564        // Replace date text.
    456565        $date_text = sprintf(
    457             /* translators: 1: day 2: month 3: year */
     566            /* translators: %1s: day %2s: month %3s: year */
    458567            esc_html__( '%1s of %2s of %3s', 'textdomain' ),
    459             date( 'd' ),
    460             $months[ (int) date('m') ],
    461             date( 'Y' )
     568            gmdate( 'd' ),
     569            $months[ (int) gmdate( 'm' ) ],
     570            gmdate( 'Y' )
    462571        );
    463572        $content = str_replace( '{fecha_texto}', $date_text, $content );
     
    467576
    468577        // Page Break.
    469         //$content = str_replace( '<!--nextpage-->', '<pagebreak>', $content );
     578        $content = str_replace( '{salto_pagina}', ' <div style="page-break-after:always; clear:both"></div>', $content );
    470579
    471580        return $content;
    472581    }
     582
     583    /**
     584     * Process images
     585     *
     586     * @param string $content Content to process.
     587     * @return string
     588     */
     589    public function process_images( $content ) {
     590        // Utilizar DOMDocument para analizar y modificar el HTML.
     591        $doc = new DOMDocument();
     592        @$doc->loadHTML( mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
     593        $images = $doc->getElementsByTagName( 'img' );
     594
     595        foreach ( $images as $img ) {
     596            $src    = $img->getAttribute( 'src' );
     597            $style  = $img->getAttribute( 'style' );
     598            $width  = $img->getAttribute( 'width' );
     599            $height = $img->getAttribute( 'height' );
     600
     601            if ( ! empty( $style ) ) {
     602                // Extraer width y height del estilo.
     603                preg_match( '/width:\s*(\d+px)/', $style, $width_match );
     604                preg_match( '/height:\s*(\d+px|auto)/', $style, $height_match );
     605
     606                $width  = $width_match[1] ?? null;
     607                $height = $height_match[1] ?? null;
     608
     609                if ( ! empty( $width ) && ! empty( $height ) && $height !== 'auto') {
     610                    $img->setAttribute( 'width', intval( $width ) );
     611                    $img->setAttribute( 'height', intval( $height ) );
     612                } else {
     613                    list( $real_width, $real_height ) = getimagesize( $src );
     614
     615                    if ( ! empty( $width ) && $height === 'auto' ) {
     616                        $real_height = intval( $real_height * $width / $real_width );
     617                        $real_width  = intval( $width );
     618                    } elseif ( $width === 'auto' && ! empty( $height ) ) {
     619                        $real_width  = intval( $real_width * $height / $real_height );
     620                        $real_height = intval( $height );
     621                    }
     622                    $img->setAttribute( 'width', $real_width );
     623                    $img->setAttribute( 'height', $real_height );
     624                }
     625            } else {
     626                // No hay información de estilo, obtener el tamaño real
     627                list( $real_width, $real_height ) = getimagesize( $src );
     628                $img->setAttribute( 'width', $real_width );
     629                $img->setAttribute( 'height', $real_height );
     630            }
     631
     632        }
     633
     634        return $doc->saveHTML();
     635    }
     636
     637    /**
     638     * Get available PDF fonts
     639     *
     640     * @return array
     641     */
     642    public function get_available_pdf_fonts() {
     643        return $this->available_pdf_fonts;
     644    }
     645
     646    /**
     647     * Add available PDF fonts
     648     *
     649     * @param string $font Font to add.
     650     */
     651    public function add_available_pdf_fonts( $font ) {
     652        $this->available_pdf_fonts[] = $font;
     653    }
     654
     655    /**
     656     * Get custom PDF fonts
     657     *
     658     * @return string
     659     */
     660    public static function get_custom_pdf_fonts() {
     661        $fonts = array(
     662            'roboto' => array(
     663                array( // Regular.
     664                    array(
     665                        'family' => 'Roboto',
     666                        'style'  => 'normal',
     667                        'weight' => 'normal',
     668                    ),
     669                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-regular.ttf',
     670                ),
     671                array( // 500.
     672                    array(
     673                        'family' => 'Roboto',
     674                        'style'  => 'normal',
     675                        'weight' => '500',
     676                    ),
     677                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-500.ttf',
     678                ),
     679                array( // 700.
     680                    array(
     681                        'family' => 'Roboto',
     682                        'style'  => 'normal',
     683                        'weight' => '700',
     684                    ),
     685                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-700.ttf',
     686                ),
     687            ),
     688        );
     689        return apply_filters( 'firmafy_custom_font_path', $fonts );
     690    }
     691
     692    /**
     693     * Get custom PDF font
     694     *
     695     * @param string $font Font to get.
     696     * @return string
     697     */
     698    public static function get_custom_pdf_font( $font ) {
     699        $fonts = self::get_custom_pdf_fonts();
     700        return isset( $fonts[ $font ] ) ? $fonts[ $font ] : array();
     701    }
     702
     703    /**
     704     * Check if font is custom
     705     *
     706     * @param string $font Font to check.
     707     * @return boolean
     708     */
     709    public static function font_is_custom( $font ) {
     710        $base_fonts = array(
     711            'courier',
     712            'helvetica',
     713            'times',
     714            'zapfdingbats',
     715        );
     716
     717        return in_array( $font, $base_fonts, true ) ? false : true;
     718    }
     719
     720    /**
     721     * Get Gutenberg CSS
     722     *
     723     * @return string
     724     */
     725    public static function get_gutenberg_css() {
     726        $combined = '';
     727   
     728        if ( file_exists( ABSPATH . 'wp-includes/css/dist/block-library/style.css' ) ) {
     729            $combined .= file_get_contents( ABSPATH . 'wp-includes/css/dist/block-library/style.css' );
     730        }
     731
     732        if ( file_exists( ABSPATH . 'wp-includes/css/dist/block-library/theme.css' ) ) {
     733            $combined .= file_get_contents( ABSPATH . 'wp-includes/css/dist/block-library/theme.css' );
     734        }
     735
     736        return $combined;
     737    }
     738
     739
     740    /**
     741     * Get block dynamic CSS
     742     *
     743     * @return string
     744     */
     745    public static function get_block_dynamic_css() {
     746        $css_url  = admin_url('load-styles.php?c=1&dir=ltr&load=wp-block-library,wp-block-editor,wp-block-editor-content,wp-editor,wp-components');
     747        $response = file_get_contents( $css_url );
     748        return $response;
     749    }
     750
     751    /**
     752     * Get template content
     753     *
     754     * @param integer $template_id Template ID.
     755     * @return string
     756     */
     757    public static function get_template_content( $template_id ) {
     758        $_post  = get_post( $template_id );
     759        $blocks = parse_blocks( $_post->post_content );
     760
     761        ob_start();
     762        foreach ( $blocks as $block ) {
     763            echo render_block( $block );
     764        }
     765
     766        return ob_get_clean();
     767    }
     768
     769    /**
     770     * Get CSS defined vars
     771     *
     772     * @return string
     773     */
     774    public static function get_css_defined_vars() {
     775        // Get the global colors.
     776        $global_colors = wp_get_global_settings( array( 'color', 'palette', 'theme' ) );
     777        $css           = '';
     778
     779        if ( isset( $global_colors['palette'] ) && is_array( $global_colors['palette'] ) ) {
     780            foreach ( $global_colors['palette'] as $color ) {
     781                $slug        = isset( $color['slug'] ) ? $color['slug'] : '';
     782                $color_value = isset( $color['color'] ) ? $color['color'] : '';
     783
     784                if ( $slug && $color_value ) {
     785                    $css .= "
     786                        .has-{$slug}-color {
     787                                color: {$color_value};
     788                        }
     789                        .has-{$slug}-background-color {
     790                                background-color: {$color_value};
     791                        }
     792                    ";
     793                }
     794            }
     795        }
     796
     797        return $css;
     798    }
     799
     800    /**
     801     * Get the attachment absolute path from its url
     802     *
     803     * @param string $url the attachment url to get its absolute path
     804     *
     805     * @return bool|string It returns the absolute path of an attachment
     806     */
     807    public static function attachment_url_to_path( $url )
     808    {
     809        $parsed_url = parse_url( $url );
     810       
     811        if ( empty( $parsed_url['path'] ) ) {
     812            return false;
     813        }
     814       
     815        $file = ABSPATH . ltrim( $parsed_url['path'], '/');
     816       
     817        return file_exists( $file ) ? $file : false;
     818    }
     819
    473820}
    474821
  • firmafy/tags/1.3.0/includes/forms/class-contactform7.php

    r3050518 r3156914  
    152152    public function firmafy_process_entry( $obj ) {
    153153        global $helpers_firmafy;
    154         $cf7_firmafy    = get_option( 'cf7_firmafy_' . $obj->id() );
    155         $submission = WPCF7_Submission::get_instance();
     154        $cf7_firmafy = get_option( 'cf7_firmafy_' . $obj->id() );
     155        $submission  = WPCF7_Submission::get_instance();
    156156
    157157        if ( $cf7_firmafy ) {
    158             $merge_vars = $this->get_merge_vars( $cf7_firmafy, $submission->get_posted_data() );
     158            $merge_vars      = $this->get_merge_vars( $cf7_firmafy, $submission->get_posted_data() );
    159159            $signers         = $helpers_firmafy->filter_signers( $cf7_firmafy );
    160160            $response_result = $helpers_firmafy->create_entry( $cf7_firmafy['firmafy_template'], $merge_vars, $signers );
  • firmafy/tags/1.3.0/includes/forms/class-gravityforms.php

    r3081802 r3156914  
    171171        global $helpers_firmafy;
    172172
    173         if ( ! empty( $feed['meta']['listFields_first_name'] ) ) {
    174             $name = $this->get_name( $entry, $feed['meta']['listFields_first_name'] );
    175         }
    176 
    177173        $merge_vars = array();
    178174        $field_maps = $this->get_field_map_fields( $feed, 'listFields' );
     
    182178            foreach ( $field_maps as $var_key => $field_id ) {
    183179                $field      = RGFormsModel::get_field( $form, $field_id );
     180
     181                if ( ! $field ) {
     182                    continue;
     183                }
     184
    184185                $field_type = RGFormsModel::get_input_type( $field );
    185186
     
    237238        }
    238239
    239         $override_custom_fields = apply_filters( 'firmafy_override_blank_custom_fields', false, $entry, $form, $feed );
    240         if ( ! $override_custom_fields ) {
    241             $merge_vars = $this->remove_blank_custom_fields( $merge_vars );
    242         }
    243 
    244240        $template        = isset( $feed['meta']['firmafy_template'] ) ? $feed['meta']['firmafy_template'] : '';
    245241        $signers         = $helpers_firmafy->filter_signers( $feed['meta'] );
    246         $response_result = $helpers_firmafy->create_entry( $template, $merge_vars, $signers );
     242        $response_result = $helpers_firmafy->create_entry( $template, $merge_vars, $signers, $entry['id'] );
    247243        $api_status      = isset( $response_result['status'] ) ? $response_result['status'] : '';
    248244
     245        $status = 'success';
    249246        if ( 'error' === $api_status ) {
    250             $this->add_note( $entry['id'], 'Error ' . $response_result['message'], 'error' );
     247            $message = sprintf(
     248                /* translators: %s: Sign error */
     249                __( 'Error creating Firmafy Sign: %s', 'firmafy' ),
     250                sanitize_text_field( $response_result['message'] )
     251            );
     252            $status = 'error';
    251253        } else {
    252             $this->add_note( $entry['id'], 'Success creating ' . esc_html( 'Firmafy' ) . ' Entry ID:' . $response_result['id'], 'success' );
    253         }
    254     }
    255 
    256     /**
    257      * Remove blank custom fields
    258      *
    259      * @param  array $merge_vars Vars to send to API.
    260      * @return array
    261      */
    262     private static function remove_blank_custom_fields( $merge_vars ) {
    263         $i = 0;
    264 
    265         $count = count( $merge_vars );
    266 
    267         for ( $i = 0; $i < $count; $i++ ) {
    268             if ( rgblank( $merge_vars[ $i ]['value'] ) ) {
    269                 unset( $merge_vars[ $i ] );
    270             }
    271         }
    272         // resort the array because items could have been removed, this will give an error from CRM if the keys are not in numeric sequence.
    273         sort( $merge_vars );
    274         return $merge_vars;
    275     }
    276 
    277     private function get_name( $entry, $field_id ) {
    278 
    279         // If field is simple (one input), simply return full content.
    280         $name = rgar( $entry, $field_id );
    281         if ( ! empty( $name ) ) {
    282             return $name;
    283         }
    284 
    285         // Complex field (multiple inputs). Join all pieces and create name.
    286         $prefix = trim( rgar( $entry, $field_id . '.2' ) );
    287         $first  = trim( rgar( $entry, $field_id . '.3' ) );
    288         $last   = trim( rgar( $entry, $field_id . '.6' ) );
    289         $suffix = trim( rgar( $entry, $field_id . '.8' ) );
    290 
    291         $name = $prefix;
    292         $name .= ! empty( $name ) && ! empty( $first ) ? " $first" : $first;
    293         $name .= ! empty( $name ) && ! empty( $last ) ? " $last" : $last;
    294         $name .= ! empty( $name ) && ! empty( $suffix ) ? " $suffix" : $suffix;
    295 
    296         return $name;
    297     }
    298 
    299 } //from main class
    300 
     254            $message = sprintf(
     255                /* translators: %s: Sign entry ID */
     256                __( 'Success creating Firmafy Sign ID: %s', 'firmafy' ),
     257                sanitize_text_field( $response_result['id'] )
     258            );
     259        }
     260        $this->add_note( $entry['id'], $message, $status );
     261    }
     262}
  • firmafy/tags/1.3.0/includes/forms/class-woocommerce.php

    r3050518 r3156914  
    137137        if ( 'orders' === $woocommerce_mode || 'all' === $woocommerce_mode ) {
    138138            $template_id     = wc_terms_and_conditions_page_id();
    139             $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), true );
     139            $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), $order_id, true );
    140140
    141141            if ( 'error' === $response_result['status'] ) {
     
    177177                    );
    178178                }
    179                 $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), true );
     179                $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), $order_id, true );
    180180
    181181                if ( 'error' === $response_result['status'] ) {
  • firmafy/tags/1.3.0/readme.txt

    r3081802 r3156914  
    11=== Firmafy eSignature ===
    2 Contributors: closetechnology, davidperez, sacrajaimez, firmafy
     2Contributors: closetechnology, davidperez, sacrajaimez, firmafy, alexbreagarcia
    33Tags: forms, signature, gravityforms, contact form 7, woocommerce
    44Requires at least: 4.0
    55Requires PHP: 5.6
    6 Tested up to: 6.5
    7 Stable tag: 1.2.1
    8 Version: 1.2.1
     6Tested up to: 6.6
     7Stable tag: 1.3.0
     8Version: 1.3.0
    99License: GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6969- Country: {pais}
    7070- Payment method: {metodo_pago}
     71- Reference: {referencia}
     72- Page break: {salto_pagina}
    7173
    7274**Firmafy use examples:**
     
    9193
    9294== Changelog ==
     95= 1.3.0 =
     96*  Added field {referencia} and get the ID of the form entry or order id. Useful to use in templates.
     97*  Added: Page break in PDF. Use {salto_pagina} for that.
     98*  Added: Name of template in the PDF file.
     99*  Fix: Process conflicts with images and styles size.
     100*  Fix: Empty variable didn't show in the template.
     101*  Fix: Gets the id of sign to the form entry.
     102*  Fix: Empty value of form, wasn't gives empty value in the template.
     103*  Added: Option to define the line height on p tags.
     104*  Added: Support for Gutenberg blocks.
     105*  Added: Font selector for PDF.
     106*  Added: Font Roboto to default font list.
     107*  Added: Upload a image and set it as background image to the PDF.
     108
    93109= 1.2.1 =
    94110*  Added: Support Gravity Forms Field name.
  • firmafy/tags/1.3.0/vendor/autoload.php

    r3050518 r3156914  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82::getLoader();
     25return ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457::getLoader();
  • firmafy/tags/1.3.0/vendor/composer/ClassLoader.php

    r3050518 r3156914  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • firmafy/tags/1.3.0/vendor/composer/InstalledVersions.php

    r3050518 r3156914  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     332                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • firmafy/tags/1.3.0/vendor/composer/autoload_classmap.php

    r3050518 r3156914  
    88return array(
    99    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    10     'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
    11     'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
    12     'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    13     'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php',
    14     'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
    15     'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
    16     'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
    17     'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
    18     'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
    19     'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
    20     'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php',
    21     'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php',
    22     'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php',
    23     'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     10    'Dompdf\\Cpdf' => $vendorDir . '/dompdf/dompdf/lib/Cpdf.php',
    2411);
  • firmafy/tags/1.3.0/vendor/composer/autoload_psr4.php

    r3050518 r3156914  
    77
    88return array(
    9     'Spipu\\Html2Pdf\\' => array($vendorDir . '/spipu/html2pdf/src'),
     9    'Svg\\' => array($vendorDir . '/dompdf/php-svg-lib/src/Svg'),
     10    'Sabberworm\\CSS\\' => array($vendorDir . '/sabberworm/php-css-parser/src'),
     11    'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'),
     12    'FontLib\\' => array($vendorDir . '/dompdf/php-font-lib/src/FontLib'),
     13    'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'),
    1014);
  • firmafy/tags/1.3.0/vendor/composer/autoload_real.php

    r3050518 r3156914  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82
     5class ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • firmafy/tags/1.3.0/vendor/composer/autoload_static.php

    r2763052 r3156914  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82
     7class ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457
    88{
    99    public static $prefixLengthsPsr4 = array (
    1010        'S' =>
    1111        array (
    12             'Spipu\\Html2Pdf\\' => 15,
     12            'Svg\\' => 4,
     13            'Sabberworm\\CSS\\' => 15,
     14        ),
     15        'M' =>
     16        array (
     17            'Masterminds\\' => 12,
     18        ),
     19        'F' =>
     20        array (
     21            'FontLib\\' => 8,
     22        ),
     23        'D' =>
     24        array (
     25            'Dompdf\\' => 7,
    1326        ),
    1427    );
    1528
    1629    public static $prefixDirsPsr4 = array (
    17         'Spipu\\Html2Pdf\\' =>
     30        'Svg\\' =>
    1831        array (
    19             0 => __DIR__ . '/..' . '/spipu/html2pdf/src',
     32            0 => __DIR__ . '/..' . '/dompdf/php-svg-lib/src/Svg',
     33        ),
     34        'Sabberworm\\CSS\\' =>
     35        array (
     36            0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/src',
     37        ),
     38        'Masterminds\\' =>
     39        array (
     40            0 => __DIR__ . '/..' . '/masterminds/html5/src',
     41        ),
     42        'FontLib\\' =>
     43        array (
     44            0 => __DIR__ . '/..' . '/dompdf/php-font-lib/src/FontLib',
     45        ),
     46        'Dompdf\\' =>
     47        array (
     48            0 => __DIR__ . '/..' . '/dompdf/dompdf/src',
    2049        ),
    2150    );
     
    2352    public static $classMap = array (
    2453        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    25         'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
    26         'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
    27         'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    28         'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php',
    29         'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
    30         'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
    31         'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
    32         'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
    33         'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
    34         'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
    35         'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php',
    36         'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php',
    37         'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php',
    38         'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     54        'Dompdf\\Cpdf' => __DIR__ . '/..' . '/dompdf/dompdf/lib/Cpdf.php',
    3955    );
    4056
     
    4258    {
    4359        return \Closure::bind(function () use ($loader) {
    44             $loader->prefixLengthsPsr4 = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$prefixLengthsPsr4;
    45             $loader->prefixDirsPsr4 = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$prefixDirsPsr4;
    46             $loader->classMap = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$classMap;
     60            $loader->prefixLengthsPsr4 = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$prefixLengthsPsr4;
     61            $loader->prefixDirsPsr4 = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$prefixDirsPsr4;
     62            $loader->classMap = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$classMap;
    4763
    4864        }, null, ClassLoader::class);
  • firmafy/tags/1.3.0/vendor/composer/installed.json

    r3050518 r3156914  
    22    "packages": [
    33        {
    4             "name": "spipu/html2pdf",
    5             "version": "v5.2.8",
    6             "version_normalized": "5.2.8.0",
    7             "source": {
    8                 "type": "git",
    9                 "url": "https://github.com/spipu/html2pdf.git",
    10                 "reference": "6c94dcd48c94c6c73f206629839c1ebd81e8c726"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/spipu/html2pdf/zipball/6c94dcd48c94c6c73f206629839c1ebd81e8c726",
    15                 "reference": "6c94dcd48c94c6c73f206629839c1ebd81e8c726",
    16                 "shasum": ""
    17             },
    18             "require": {
     4            "name": "dompdf/dompdf",
     5            "version": "v3.0.0",
     6            "version_normalized": "3.0.0.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/dompdf/dompdf.git",
     10                "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/dompdf/dompdf/zipball/fbc7c5ee5d94f7a910b78b43feb7931b7f971b59",
     15                "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "dompdf/php-font-lib": "^1.0.0",
     20                "dompdf/php-svg-lib": "^1.0.0",
     21                "ext-dom": "*",
     22                "ext-mbstring": "*",
     23                "masterminds/html5": "^2.0",
     24                "php": "^7.1 || ^8.0"
     25            },
     26            "require-dev": {
    1927                "ext-gd": "*",
     28                "ext-json": "*",
     29                "ext-zip": "*",
     30                "mockery/mockery": "^1.3",
     31                "phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10",
     32                "squizlabs/php_codesniffer": "^3.5",
     33                "symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
     34            },
     35            "suggest": {
     36                "ext-gd": "Needed to process images",
     37                "ext-gmagick": "Improves image processing performance",
     38                "ext-imagick": "Improves image processing performance",
     39                "ext-zlib": "Needed for pdf stream compression"
     40            },
     41            "time": "2024-04-29T14:01:28+00:00",
     42            "type": "library",
     43            "installation-source": "dist",
     44            "autoload": {
     45                "psr-4": {
     46                    "Dompdf\\": "src/"
     47                },
     48                "classmap": [
     49                    "lib/"
     50                ]
     51            },
     52            "notification-url": "https://packagist.org/downloads/",
     53            "license": [
     54                "LGPL-2.1"
     55            ],
     56            "authors": [
     57                {
     58                    "name": "The Dompdf Community",
     59                    "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
     60                }
     61            ],
     62            "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
     63            "homepage": "https://github.com/dompdf/dompdf",
     64            "support": {
     65                "issues": "https://github.com/dompdf/dompdf/issues",
     66                "source": "https://github.com/dompdf/dompdf/tree/v3.0.0"
     67            },
     68            "install-path": "../dompdf/dompdf"
     69        },
     70        {
     71            "name": "dompdf/php-font-lib",
     72            "version": "1.0.0",
     73            "version_normalized": "1.0.0.0",
     74            "source": {
     75                "type": "git",
     76                "url": "https://github.com/dompdf/php-font-lib.git",
     77                "reference": "991d6a954f6bbd7e41022198f00586b230731441"
     78            },
     79            "dist": {
     80                "type": "zip",
     81                "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/991d6a954f6bbd7e41022198f00586b230731441",
     82                "reference": "991d6a954f6bbd7e41022198f00586b230731441",
     83                "shasum": ""
     84            },
     85            "require": {
    2086                "ext-mbstring": "*",
    21                 "php": "^5.6 || ^7.0 || ^8.0",
    22                 "tecnickcom/tcpdf": "^6.3"
    23             },
    24             "require-dev": {
    25                 "phpunit/phpunit": "^5.0 || ^9.0"
     87                "php": "^7.1 || ^8.0"
     88            },
     89            "require-dev": {
     90                "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6"
     91            },
     92            "time": "2024-04-29T13:40:38+00:00",
     93            "type": "library",
     94            "installation-source": "dist",
     95            "autoload": {
     96                "psr-4": {
     97                    "FontLib\\": "src/FontLib"
     98                }
     99            },
     100            "notification-url": "https://packagist.org/downloads/",
     101            "license": [
     102                "LGPL-2.1-or-later"
     103            ],
     104            "authors": [
     105                {
     106                    "name": "The FontLib Community",
     107                    "homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
     108                }
     109            ],
     110            "description": "A library to read, parse, export and make subsets of different types of font files.",
     111            "homepage": "https://github.com/dompdf/php-font-lib",
     112            "support": {
     113                "issues": "https://github.com/dompdf/php-font-lib/issues",
     114                "source": "https://github.com/dompdf/php-font-lib/tree/1.0.0"
     115            },
     116            "install-path": "../dompdf/php-font-lib"
     117        },
     118        {
     119            "name": "dompdf/php-svg-lib",
     120            "version": "1.0.0",
     121            "version_normalized": "1.0.0.0",
     122            "source": {
     123                "type": "git",
     124                "url": "https://github.com/dompdf/php-svg-lib.git",
     125                "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af"
     126            },
     127            "dist": {
     128                "type": "zip",
     129                "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
     130                "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
     131                "shasum": ""
     132            },
     133            "require": {
     134                "ext-mbstring": "*",
     135                "php": "^7.1 || ^8.0",
     136                "sabberworm/php-css-parser": "^8.4"
     137            },
     138            "require-dev": {
     139                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
     140            },
     141            "time": "2024-04-29T13:26:35+00:00",
     142            "type": "library",
     143            "installation-source": "dist",
     144            "autoload": {
     145                "psr-4": {
     146                    "Svg\\": "src/Svg"
     147                }
     148            },
     149            "notification-url": "https://packagist.org/downloads/",
     150            "license": [
     151                "LGPL-3.0-or-later"
     152            ],
     153            "authors": [
     154                {
     155                    "name": "The SvgLib Community",
     156                    "homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md"
     157                }
     158            ],
     159            "description": "A library to read, parse and export to PDF SVG files.",
     160            "homepage": "https://github.com/dompdf/php-svg-lib",
     161            "support": {
     162                "issues": "https://github.com/dompdf/php-svg-lib/issues",
     163                "source": "https://github.com/dompdf/php-svg-lib/tree/1.0.0"
     164            },
     165            "install-path": "../dompdf/php-svg-lib"
     166        },
     167        {
     168            "name": "masterminds/html5",
     169            "version": "2.9.0",
     170            "version_normalized": "2.9.0.0",
     171            "source": {
     172                "type": "git",
     173                "url": "https://github.com/Masterminds/html5-php.git",
     174                "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
     175            },
     176            "dist": {
     177                "type": "zip",
     178                "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
     179                "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
     180                "shasum": ""
     181            },
     182            "require": {
     183                "ext-dom": "*",
     184                "php": ">=5.3.0"
     185            },
     186            "require-dev": {
     187                "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
     188            },
     189            "time": "2024-03-31T07:05:07+00:00",
     190            "type": "library",
     191            "extra": {
     192                "branch-alias": {
     193                    "dev-master": "2.7-dev"
     194                }
     195            },
     196            "installation-source": "dist",
     197            "autoload": {
     198                "psr-4": {
     199                    "Masterminds\\": "src"
     200                }
     201            },
     202            "notification-url": "https://packagist.org/downloads/",
     203            "license": [
     204                "MIT"
     205            ],
     206            "authors": [
     207                {
     208                    "name": "Matt Butcher",
     209                    "email": "technosophos@gmail.com"
     210                },
     211                {
     212                    "name": "Matt Farina",
     213                    "email": "matt@mattfarina.com"
     214                },
     215                {
     216                    "name": "Asmir Mustafic",
     217                    "email": "goetas@gmail.com"
     218                }
     219            ],
     220            "description": "An HTML5 parser and serializer.",
     221            "homepage": "http://masterminds.github.io/html5-php",
     222            "keywords": [
     223                "HTML5",
     224                "dom",
     225                "html",
     226                "parser",
     227                "querypath",
     228                "serializer",
     229                "xml"
     230            ],
     231            "support": {
     232                "issues": "https://github.com/Masterminds/html5-php/issues",
     233                "source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
     234            },
     235            "install-path": "../masterminds/html5"
     236        },
     237        {
     238            "name": "sabberworm/php-css-parser",
     239            "version": "v8.6.0",
     240            "version_normalized": "8.6.0.0",
     241            "source": {
     242                "type": "git",
     243                "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
     244                "reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70"
     245            },
     246            "dist": {
     247                "type": "zip",
     248                "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
     249                "reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
     250                "shasum": ""
     251            },
     252            "require": {
     253                "ext-iconv": "*",
     254                "php": ">=5.6.20"
     255            },
     256            "require-dev": {
     257                "phpunit/phpunit": "^5.7.27"
    26258            },
    27259            "suggest": {
    28                 "ext-gd": "Allows to embed images into the PDF",
    29                 "fagundes/zff-html2pdf": "if you need to integrate Html2Pdf with Zend Framework 2 (zf2)"
    30             },
    31             "time": "2023-07-18T14:52:59+00:00",
    32             "type": "library",
    33             "installation-source": "dist",
    34             "autoload": {
    35                 "psr-4": {
    36                     "Spipu\\Html2Pdf\\": "src/"
    37                 }
    38             },
    39             "notification-url": "https://packagist.org/downloads/",
    40             "license": [
    41                 "OSL-3.0"
    42             ],
    43             "authors": [
    44                 {
    45                     "name": "Spipu",
    46                     "homepage": "https://github.com/spipu",
    47                     "role": "Developer"
    48                 }
    49             ],
    50             "description": "Html2Pdf is a HTML to PDF converter written in PHP5 (it uses TCPDF). OFFICIAL PACKAGE",
    51             "homepage": "http://html2pdf.fr/",
     260                "ext-mbstring": "for parsing UTF-8 CSS"
     261            },
     262            "time": "2024-07-01T07:33:21+00:00",
     263            "type": "library",
     264            "extra": {
     265                "branch-alias": {
     266                    "dev-main": "9.0.x-dev"
     267                }
     268            },
     269            "installation-source": "dist",
     270            "autoload": {
     271                "psr-4": {
     272                    "Sabberworm\\CSS\\": "src/"
     273                }
     274            },
     275            "notification-url": "https://packagist.org/downloads/",
     276            "license": [
     277                "MIT"
     278            ],
     279            "authors": [
     280                {
     281                    "name": "Raphael Schweikert"
     282                },
     283                {
     284                    "name": "Oliver Klee",
     285                    "email": "github@oliverklee.de"
     286                },
     287                {
     288                    "name": "Jake Hotson",
     289                    "email": "jake.github@qzdesign.co.uk"
     290                }
     291            ],
     292            "description": "Parser for CSS Files written in PHP",
     293            "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
    52294            "keywords": [
    53                 "html",
    54                 "html2pdf",
    55                 "pdf"
    56             ],
    57             "support": {
    58                 "issues": "https://github.com/spipu/html2pdf/issues",
    59                 "source": "https://github.com/spipu/html2pdf/tree/v5.2.8"
    60             },
    61             "install-path": "../spipu/html2pdf"
    62         },
    63         {
    64             "name": "tecnickcom/tcpdf",
    65             "version": "6.6.5",
    66             "version_normalized": "6.6.5.0",
    67             "source": {
    68                 "type": "git",
    69                 "url": "https://github.com/tecnickcom/TCPDF.git",
    70                 "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce"
    71             },
    72             "dist": {
    73                 "type": "zip",
    74                 "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5fce932fcee4371865314ab7f6c0d85423c5c7ce",
    75                 "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce",
    76                 "shasum": ""
    77             },
    78             "require": {
    79                 "php": ">=5.3.0"
    80             },
    81             "time": "2023-09-06T15:09:26+00:00",
    82             "type": "library",
    83             "installation-source": "dist",
    84             "autoload": {
    85                 "classmap": [
    86                     "config",
    87                     "include",
    88                     "tcpdf.php",
    89                     "tcpdf_parser.php",
    90                     "tcpdf_import.php",
    91                     "tcpdf_barcodes_1d.php",
    92                     "tcpdf_barcodes_2d.php",
    93                     "include/tcpdf_colors.php",
    94                     "include/tcpdf_filters.php",
    95                     "include/tcpdf_font_data.php",
    96                     "include/tcpdf_fonts.php",
    97                     "include/tcpdf_images.php",
    98                     "include/tcpdf_static.php",
    99                     "include/barcodes/datamatrix.php",
    100                     "include/barcodes/pdf417.php",
    101                     "include/barcodes/qrcode.php"
    102                 ]
    103             },
    104             "notification-url": "https://packagist.org/downloads/",
    105             "license": [
    106                 "LGPL-3.0-or-later"
    107             ],
    108             "authors": [
    109                 {
    110                     "name": "Nicola Asuni",
    111                     "email": "info@tecnick.com",
    112                     "role": "lead"
    113                 }
    114             ],
    115             "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
    116             "homepage": "http://www.tcpdf.org/",
    117             "keywords": [
    118                 "PDFD32000-2008",
    119                 "TCPDF",
    120                 "barcodes",
    121                 "datamatrix",
    122                 "pdf",
    123                 "pdf417",
    124                 "qrcode"
    125             ],
    126             "support": {
    127                 "issues": "https://github.com/tecnickcom/TCPDF/issues",
    128                 "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.5"
    129             },
    130             "funding": [
    131                 {
    132                     "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
    133                     "type": "custom"
    134                 }
    135             ],
    136             "install-path": "../tecnickcom/tcpdf"
     295                "css",
     296                "parser",
     297                "stylesheet"
     298            ],
     299            "support": {
     300                "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
     301                "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.6.0"
     302            },
     303            "install-path": "../sabberworm/php-css-parser"
    137304        }
    138305    ],
    139     "dev": true,
     306    "dev": false,
    140307    "dev-package-names": []
    141308}
  • firmafy/tags/1.3.0/vendor/composer/installed.php

    r3050518 r3156914  
    22    'root' => array(
    33        'name' => '__root__',
    4         'pretty_version' => 'dev-develop',
    5         'version' => 'dev-develop',
    6         'reference' => 'e2793614c9f9e652064a45c89d55c60497cd114d',
     4        'pretty_version' => '1.3.0',
     5        'version' => '1.3.0.0',
     6        'reference' => '4982c0d707bb4bab7b40992ae1b5f09580faf029',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
    99        'aliases' => array(),
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
    1313        '__root__' => array(
    14             'pretty_version' => 'dev-develop',
    15             'version' => 'dev-develop',
    16             'reference' => 'e2793614c9f9e652064a45c89d55c60497cd114d',
     14            'pretty_version' => '1.3.0',
     15            'version' => '1.3.0.0',
     16            'reference' => '4982c0d707bb4bab7b40992ae1b5f09580faf029',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    2020            'dev_requirement' => false,
    2121        ),
    22         'spipu/html2pdf' => array(
    23             'pretty_version' => 'v5.2.8',
    24             'version' => '5.2.8.0',
    25             'reference' => '6c94dcd48c94c6c73f206629839c1ebd81e8c726',
     22        'dompdf/dompdf' => array(
     23            'pretty_version' => 'v3.0.0',
     24            'version' => '3.0.0.0',
     25            'reference' => 'fbc7c5ee5d94f7a910b78b43feb7931b7f971b59',
    2626            'type' => 'library',
    27             'install_path' => __DIR__ . '/../spipu/html2pdf',
     27            'install_path' => __DIR__ . '/../dompdf/dompdf',
    2828            'aliases' => array(),
    2929            'dev_requirement' => false,
    3030        ),
    31         'tecnickcom/tcpdf' => array(
    32             'pretty_version' => '6.6.5',
    33             'version' => '6.6.5.0',
    34             'reference' => '5fce932fcee4371865314ab7f6c0d85423c5c7ce',
     31        'dompdf/php-font-lib' => array(
     32            'pretty_version' => '1.0.0',
     33            'version' => '1.0.0.0',
     34            'reference' => '991d6a954f6bbd7e41022198f00586b230731441',
    3535            'type' => 'library',
    36             'install_path' => __DIR__ . '/../tecnickcom/tcpdf',
     36            'install_path' => __DIR__ . '/../dompdf/php-font-lib',
     37            'aliases' => array(),
     38            'dev_requirement' => false,
     39        ),
     40        'dompdf/php-svg-lib' => array(
     41            'pretty_version' => '1.0.0',
     42            'version' => '1.0.0.0',
     43            'reference' => 'eb045e518185298eb6ff8d80d0d0c6b17aecd9af',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../dompdf/php-svg-lib',
     46            'aliases' => array(),
     47            'dev_requirement' => false,
     48        ),
     49        'masterminds/html5' => array(
     50            'pretty_version' => '2.9.0',
     51            'version' => '2.9.0.0',
     52            'reference' => 'f5ac2c0b0a2eefca70b2ce32a5809992227e75a6',
     53            'type' => 'library',
     54            'install_path' => __DIR__ . '/../masterminds/html5',
     55            'aliases' => array(),
     56            'dev_requirement' => false,
     57        ),
     58        'sabberworm/php-css-parser' => array(
     59            'pretty_version' => 'v8.6.0',
     60            'version' => '8.6.0.0',
     61            'reference' => 'd2fb94a9641be84d79c7548c6d39bbebba6e9a70',
     62            'type' => 'library',
     63            'install_path' => __DIR__ . '/../sabberworm/php-css-parser',
    3764            'aliases' => array(),
    3865            'dev_requirement' => false,
  • firmafy/tags/1.3.0/vendor/composer/platform_check.php

    r2763052 r3156914  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 50600)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 70100)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • firmafy/trunk/firmafy.php

    r3081802 r3156914  
    44 * Plugin URI:  https://firmafy.com
    55 * Description: Validate legally your forms in WordPress.
    6  * Version:     1.2.1
     6 * Version:     1.3.0
    77 * Author:      Firmafy
    88 * Author URI:  https://firmafy.com
     
    2424defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
    2525
    26 define( 'FIRMAFY_VERSION', '1.2.1' );
     26define( 'FIRMAFY_VERSION', '1.3.0' );
    2727define( 'FIRMAFY_PLUGIN', __FILE__ );
    2828define( 'FIRMAFY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     
    5454if ( ( is_plugin_active( 'gravityforms/gravityforms.php' ) || is_plugin_active( 'gravity-forms/gravityforms.php' ) ) && ! class_exists( 'FIRMAFY_Bootstrap' ) ) {
    5555    add_action( 'gform_loaded', array( 'FIRMAFY_Bootstrap', 'load' ), 5 );
     56    /**
     57     * Firmafy Bootstrap
     58     */
    5659    class FIRMAFY_Bootstrap {
    57 
     60        /**
     61         * Load the plugin after Gravity Forms
     62         *
     63         * @return void
     64         */
    5865        public static function load() {
    5966
     
    6875    }
    6976
     77    /**
     78     * Get an instance of the Firmafy class
     79     *
     80     * @return GFFirmafy
     81     */
    7082    function gf_firmafy() {
    7183        return GFFirmafy::get_instance();
  • firmafy/trunk/includes/assets/admin.css

    r3050518 r3156914  
    6464}
    6565
     66.firmafy-upload-btn {
     67    margin-top: 10px !important;
     68}
     69
     70@media( min-width: 768px ) {
     71    .firmafy-upload-btn {
     72        margin-left: 5px !important;
     73        margin-top: 0 !important;
     74    }
     75}
     76
    6677/* Tablet vertical */
    6778@media only screen and (max-width: 860px) {
  • firmafy/trunk/includes/class-firmafy-admin-settings.php

    r3050518 r3156914  
    5858            array(),
    5959            FIRMAFY_VERSION
     60        );
     61
     62        wp_register_script(
     63            'firmafy-admin-js',
     64            FIRMAFY_PLUGIN_URL . '/includes/assets/admin.js',
     65            array(),
     66            FIRMAFY_VERSION,
     67            true
    6068        );
    6169    }
     
    237245
    238246        add_settings_field(
     247            'firmafy_line_height',
     248            __( 'Line heigth', 'firmafy' ),
     249            array( $this, 'firmafy_line_height_callback' ),
     250            'firmafy_options',
     251            'admin_firmafy_settings'
     252        );
     253
     254        add_settings_field(
     255            'firmafy_pdf_font',
     256            __( 'PDF Font', 'firmafy' ),
     257            array( $this, 'firmafy_pdf_font_callback' ),
     258            'firmafy_options',
     259            'admin_firmafy_settings'
     260        );
     261
     262        add_settings_field(
     263            'firmafy_pdf_background',
     264            __( 'PDF image background', 'firmafy' ),
     265            array( $this, 'firmafy_pdf_background_callback' ),
     266            'firmafy_options',
     267            'admin_firmafy_settings'
     268        );
     269
     270        add_settings_field(
     271            'firmafy_pdf_logo',
     272            __( 'PDF logo image', 'firmafy' ),
     273            array( $this, 'firmafy_pdf_logo_callback' ),
     274            'firmafy_options',
     275            'admin_firmafy_settings'
     276        );
     277
     278        add_settings_field(
    239279            'firmafy_signers',
    240280            __( 'Signers by default', 'firmafy' ),
     
    325365        }
    326366
     367        if ( isset( $input['line_height'] ) ) {
     368            $sanitary_values['line_height'] = sanitize_text_field( $input['line_height'] );
     369        }
     370
     371        if ( isset( $input['pdf_font'] ) ) {
     372            $sanitary_values['pdf_font'] = sanitize_text_field( $input['pdf_font'] );
     373        }
     374
     375        if ( isset( $_POST['pdf_background'] ) ) {
     376            $sanitary_values['pdf_background'] = sanitize_text_field( $_POST['pdf_background'] );
     377        }
     378
     379        if ( isset( $_POST['pdf_logo'] ) ) {
     380            $sanitary_values['pdf_logo'] = sanitize_text_field( $_POST['pdf_logo'] );
     381        }
     382
    327383        // Save Signers options.
    328384        if ( isset( $input['signers'] ) ) {
     
    408464        echo checked( in_array( 'email', $notification, true ), 1 ) . ' />';
    409465        echo '<label for="notification">Email</label>';
     466    }
     467
     468    /**
     469     * Line height callback.
     470     *
     471     * @return void
     472     */
     473    public function firmafy_line_height_callback() {
     474        printf(
     475            '<input placeholder="%s" class="regular-text" type="text" name="firmafy_options[line_height]" id="line_height" value="%s"> (in pixels)',
     476            __( 'Default: 16px', 'firmafy' ),
     477            isset( $this->firmafy_settings['line_height'] ) ? esc_attr( $this->firmafy_settings['line_height'] ) : ''
     478        );
     479    }
     480
     481    /**
     482     * PDF Font callback.
     483     *
     484     * @return void
     485     */
     486    public function firmafy_pdf_font_callback() {
     487        global $helpers_firmafy;
     488
     489        // Get all fonts.
     490        $fonts = $helpers_firmafy->get_available_pdf_fonts();
     491
     492        echo '<select class="regular-text" name="firmafy_options[pdf_font]" id="pdf_font">';
     493        foreach ( $fonts as $font ) {
     494            echo '<option value="' . esc_html( $font ) . '" ';
     495            selected( $font, isset( $this->firmafy_settings['pdf_font'] ) ? $this->firmafy_settings['pdf_font'] : '' );
     496            echo '>' . esc_html( $font ) . '</option>';
     497        }
     498        echo '</select>';
     499    }
     500
     501    /**
     502     * PDF Background callback.
     503     *
     504     * @return void
     505     */
     506    public function firmafy_pdf_background_callback() {
     507        global $helpers_firmafy;
     508
     509        wp_enqueue_script( 'firmafy-admin-js' );
     510        wp_enqueue_media();
     511
     512        echo '<input class="regular-text" type="text" name="pdf_background" id="pdf_background" value="' . esc_attr( $this->firmafy_settings['pdf_background'] ) . '">';
     513        echo '<div class="js-firmafy-upload-file button firmafy-upload-btn">' . esc_html( 'Upload', 'firmafy ') . '</div>';
     514    }
     515
     516    /**
     517     * PDF Logo callback.
     518     *
     519     * @return void
     520     */
     521    public function firmafy_pdf_logo_callback() {
     522        wp_enqueue_script( 'firmafy-admin-js' );
     523        wp_enqueue_media();
     524
     525        echo '<input class="regular-text" type="text" name="pdf_logo" id="pdf_logo" value="' . esc_attr( $this->firmafy_settings['pdf_logo'] ) . '">';
     526        echo '<div class="js-firmafy-upload-logo-file button firmafy-upload-btn">' . esc_html( 'Upload', 'firmafy ') . '</div>';
    410527    }
    411528
  • firmafy/trunk/includes/class-helpers-firmafy.php

    r3081802 r3156914  
    1313require FIRMAFY_PLUGIN_PATH . '/vendor/autoload.php';
    1414
    15 use Spipu\Html2Pdf\Html2Pdf;
    16 
     15use Dompdf\Dompdf;
     16use Dompdf\Options;
    1717/**
    1818 * Class Firmafy.
     
    2323 */
    2424class Helpers_Firmafy {
     25
     26    /**
     27     * Available PDF Fonts
     28     *
     29     * @var array
     30     */
     31    public $available_pdf_fonts;
     32
     33    /**
     34     * Constructor
     35     */
     36    public function __construct() {
     37        // Add the available_pdf_fonts.
     38        $this->available_pdf_fonts = array(
     39            'roboto'       => 'Roboto',
     40            'courier'      => 'Courier',
     41            'times'        => 'Times',
     42            'zapfdingbats' => 'ZapfDingbats',
     43        );
     44    }
     45
    2546    /**
    2647     * POSTS API from Firmafy
     
    173194     * Filter signers from feed meta
    174195     *
    175      * @param array $meta
    176      * @return void
     196     * @param array $meta Meta to filter.
     197     * @return array
    177198     */
    178199    public function filter_signers( $meta ) {
     
    190211     * Get Firmafy Templates
    191212     *
     213     * @param integer $template_id Template ID.
    192214     * @return array
    193215     */
    194216    public function get_variables_template( $template_id ) {
    195         $fields   = array();
    196         $template = get_post( $template_id );
     217        $fields              = array();
     218        $template            = get_post( $template_id );
    197219        $required_api_fields = array(
    198220            'nombre',
     
    202224        );
    203225
    204         preg_match_all( '#\{(.*?)\}#', $template->post_content, $matches);
     226        preg_match_all( '#\{(.*?)\}#', $template->post_content, $matches );
    205227        if ( ! empty( $matches[1] ) && is_array( $matches[1] ) ) {
    206228            foreach ( $matches[1] as $field ) {
     
    210232            }
    211233            $fields_to_convert = array_unique( array_merge( $fields, $required_api_fields ) );
    212             $fields   = array();
     234            $fields           = array();
    213235            foreach ( $fields_to_convert as $field ) {
    214236                $fields[] = array(
     
    225247     * Shows is field is required
    226248     *
    227      * @param array $field
     249     * @param array $field Field to check.
    228250     * @return boolean
    229251     */
     
    237259
    238260    /**
    239      * detects strange string
    240      *
    241      * @param [type] $string
     261     * Detects strange string
     262     *
     263     * @param string $string String to check.
    242264     * @return boolean
    243265     */
     
    255277            return false;
    256278        }
     279        if ( false !== strpos( $string, 'salto_pagina' ) ) {
     280            return false;
     281        }
    257282        if ( false !== strpos( $string, ':' ) ) {
    258283            return false;
     
    267292     * @param array   $merge_vars Merge Vars.
    268293     * @param array   $force_signers Second Signers.
     294     * @param integer $entry_id Entry ID.
    269295     * @param boolean $add_header Add Header.
    270296     *
    271297     * @return array
    272298     */
    273     public function create_entry( $template_id, $merge_vars, $force_signers = array(), $add_header = false ) {
     299    public function create_entry( $template_id, $merge_vars, $force_signers = array(), $entry_id = null, $add_header = false ) {
    274300        $settings         = get_option( 'firmafy_options' );
    275301        $id_show          = isset( $settings['id_show'] ) ? $settings['id_show'] : '';
    276         $font             = isset( $settings['font'] ) ? $settings['font'] : 'helvetica';
     302        $font             = isset( $settings['pdf_font'] ) ? strtolower( $settings['pdf_font'] ) : 'helvetica';
     303        $pdf_background   =  isset( $settings['pdf_background'] ) ? $settings['pdf_background'] : '';
    277304        $signer           = array();
    278305        $temp_content_pre = '';
     
    287314            $company_signers = $settings['signers'];
    288315
    289             // Check duplicated signers.
     316            // Check duplicated signers.ƒ
    290317            if ( ! empty( $force_signers ) ) {
    291318                $delete = array_diff( array_column( $company_signers, 'nif' ), $force_signers );
     
    322349
    323350        foreach ( $merge_vars as $variable ) {
    324             if ( ! empty( $variable['name'] ) ) {
     351            if ( isset( $variable['name'] ) ) {
    325352                $value            = is_array( $variable['value'] ) ? implode( ', ', $variable['value'] ) : $variable['value'];
    326353                $template_content = str_replace( '{' . $variable['name'] . '}', $value, $template_content );
     
    335362        $signer['type_notifications'] = implode( ',', $notification );
    336363
    337         $template_content = $this->replace_tags( $template_content, $template_id );
     364        // Replace tags.
     365        $template_content = $this->replace_tags( $template_content, $template_id, $entry_id );
     366
     367        // Process images.
     368        $template_content = $this->process_images( $template_content );
    338369
    339370        // Generates PDF.
    340         $filename = 'firmafy-' . sanitize_title( get_bloginfo( 'name' ) ) . '-' . gmdate( 'Y-m-d-H-i' ) . '.pdf';
    341 
    342         $content  = '<page style="margin-top:10mm;" backcolor="#fff">';
     371        $filename  = 'firmafy-' . sanitize_title( get_bloginfo( 'name' ) );
     372        $filename .= '-' . sanitize_title( get_the_title( $template_id ) );
     373        $filename .= '-' . gmdate( 'Y-m-d-H-i' ) . '.pdf';
     374
     375        $content  = '<html>';
     376        $content .= '<head>';
    343377        $content .= '<style>';
     378
     379        // Prepare Font family tag ready to replace.
     380        $body_replace_tags = array(
     381            'font-family: "{{fontFamily}}", sans-serif !important;',
     382        );
     383
     384        // Prepare for the PDF background.
     385        if ( ! empty( $pdf_background ) ) {
     386            $body_replace_tags[] = 'background-image: url(' . $pdf_background . '); background-size: cover;  background-position: center; background-repeat: no-repeat;';
     387        }
     388
     389        // Append the body CSS.
     390        $content .= 'body { ' . implode( ' ', $body_replace_tags ) . ' }';
     391
    344392        // Gets Template Style.
    345393        $template_css_file = get_template_directory() . '/style.css';
     
    347395            $content .= file_get_contents( $template_css_file );
    348396        }
     397       
    349398        // Gets Template Child Style.
    350399        $template_css_file = get_stylesheet_directory() . '/style.css';
     
    353402        }
    354403
     404        // Gets the custom PDF styles.
     405        $template_pdf_css_file = FIRMAFY_PLUGIN_PATH . 'assets/pdf.css';
     406        if ( file_exists( $template_pdf_css_file ) ) {
     407            $content .= file_get_contents( $template_css_file );
     408        }
     409
     410        // Get the Gutenberg styles.
     411        $content .= $this::get_gutenberg_css();
     412
     413        // Append the line height to the style (only for p tags).
     414        $line_height = ! empty( $settings['line_height'] ) ? $settings['line_height'] : '16';
     415
     416        $content .= 'p.firmafy-lh { line-height: ' . $line_height . 'px; }';
    355417        $content .= '</style>';
     418        $content .= '</head>';
     419        $content .= '<body>';
    356420        $content .= $template_content;
    357         $content .= '</page>';
     421        $content .= '</body>';
     422        $content .= '</html>';
    358423
    359424        // Creates PDF.
    360         $lang = isset( explode( '_', get_locale() )[0] ) ? explode( '_', get_locale() )[0] : 'en';
    361425        try {
    362             $html2pdf  = new Html2Pdf(
    363                 'P',
    364                 'A4',
    365                 $lang,
    366                 true,
    367                 'UTF-8',
    368                 array( 10, 10, 10, 10 ) // in mm.
    369             );
    370             $html2pdf->addFont( $font );
    371             $html2pdf->setDefaultFont( $font );
    372             $html2pdf->setTestTdInOnePage( false );
    373             $html2pdf->writeHTML( $content );
    374             $pdf_content = $html2pdf->Output( $filename, 'S' );
    375         } catch ( Html2PdfException $e ) { //phpcs:ignore
    376             $formatter = new ExceptionFormatter( $e ); //phpcs:ignore
    377             error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $formatter->getHtmlMessage() );
     426            // Define the options.
     427            $options = new Options();
     428            $options->set( 'isHtml5ParserEnabled', true ); // Enable HTML5 parser.
     429            $options->set( 'isRemoteEnabled', true ); // Enable remote file access.
     430            $options->set( 'isFontSubsettingEnabled', true );
     431
     432            // Initialize the Dompdf instance.
     433            $dompdf = new Dompdf( $options );
     434
     435            // Check if selected font is custom or not. If is custom, we must add the full path.
     436            if ( $this::font_is_custom( $font ) ) {
     437                $custom_font = self::get_custom_pdf_font( $font );
     438
     439                if ( ! empty( $custom_font ) ) {
     440                    foreach( $custom_font as $pdf_font ) {
     441                        $dompdf->getFontMetrics()->registerFont( $pdf_font[0], $pdf_font[1] );
     442                    }
     443                } else {
     444                    $font = 'helvetica';
     445                }
     446            }
     447           
     448            // Set the font.
     449            $content = str_replace( '{{fontFamily}}', ucfirst( $font ), $content );
     450
     451            // Setup the paper size and orientation.
     452            $dompdf->setPaper( 'A4', 'portrait' );
     453
     454            // Load HTML content.
     455            $dompdf->loadHtml( $content );
     456
     457            // Render the HTML to PDF.
     458            $dompdf->render();
     459
     460            // Check if logo is configured.
     461            $logo_path = ! empty( $settings['pdf_logo'] )
     462                ? $this::attachment_url_to_path( $settings['pdf_logo'] )
     463                : '';
     464
     465            if ( $logo_path ) {
     466                $dompdf->getCanvas()->page_script( function ( $pageNumber, $pageCount, $canvas, $fontMetrics ) use ( $logo_path ) {
     467                    if ( file_exists( $logo_path ) ) {
     468                        $canvas->image( $logo_path, 30, 10, 100, 18 );
     469                    }
     470                });
     471            }
     472
     473            // Output the generated PDF.
     474            $pdf_content = $dompdf->output();
     475        } catch ( Exception $e ) { //phpcs:ignore
     476            error_log( 'Unexpected Error!<br>Can not load PDF this time! ' . $e->getMessage() );
    378477        }
    379478
     
    390489            'pdf_base64' => chunk_split( base64_encode( $pdf_content ) ),
    391490        );
     491
    392492        $result_api = $this->api_post( $settings, 'request', $query );
    393493
    394494        if ( 'error' === $result_api['status'] ) {
    395495            $result_api['message'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
    396         }
     496        } else {
     497            $result_api['id'] = isset( $result_api['data'] ) ? $result_api['data'] : '';
     498        }
     499
    397500        return $result_api;
    398501    }
     
    423526     * Replaces variables in document with allowed tags and core variables
    424527     *
    425      * @param string $content  Content to replace
    426      * @param integer $post_id Reference post
     528     * @param string  $content Content to replace.
     529     * @param integer $post_id Reference post.
     530     * @param integer $entry_id Entry ID.
     531     *
    427532     * @return string
    428533     */
    429     private function replace_tags( $content, $post_id ) {
     534    private function replace_tags( $content, $post_id, $entry_id = null ) {
    430535        $months = array(
    431536            1  => __( 'January', 'firmafy' ),
     
    451556
    452557        // Replace date.
    453         $content = str_replace( '{fecha}', date( 'd-m-Y' ), $content );
     558        $content = str_replace( '{fecha}', gmdate( 'd-m-Y' ), $content );
     559
     560        if ( ! empty( $entry_id ) ) {
     561            $content = str_replace( '{referencia}', $entry_id, $content );
     562        }
    454563
    455564        // Replace date text.
    456565        $date_text = sprintf(
    457             /* translators: 1: day 2: month 3: year */
     566            /* translators: %1s: day %2s: month %3s: year */
    458567            esc_html__( '%1s of %2s of %3s', 'textdomain' ),
    459             date( 'd' ),
    460             $months[ (int) date('m') ],
    461             date( 'Y' )
     568            gmdate( 'd' ),
     569            $months[ (int) gmdate( 'm' ) ],
     570            gmdate( 'Y' )
    462571        );
    463572        $content = str_replace( '{fecha_texto}', $date_text, $content );
     
    467576
    468577        // Page Break.
    469         //$content = str_replace( '<!--nextpage-->', '<pagebreak>', $content );
     578        $content = str_replace( '{salto_pagina}', ' <div style="page-break-after:always; clear:both"></div>', $content );
    470579
    471580        return $content;
    472581    }
     582
     583    /**
     584     * Process images
     585     *
     586     * @param string $content Content to process.
     587     * @return string
     588     */
     589    public function process_images( $content ) {
     590        // Utilizar DOMDocument para analizar y modificar el HTML.
     591        $doc = new DOMDocument();
     592        @$doc->loadHTML( mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
     593        $images = $doc->getElementsByTagName( 'img' );
     594
     595        foreach ( $images as $img ) {
     596            $src    = $img->getAttribute( 'src' );
     597            $style  = $img->getAttribute( 'style' );
     598            $width  = $img->getAttribute( 'width' );
     599            $height = $img->getAttribute( 'height' );
     600
     601            if ( ! empty( $style ) ) {
     602                // Extraer width y height del estilo.
     603                preg_match( '/width:\s*(\d+px)/', $style, $width_match );
     604                preg_match( '/height:\s*(\d+px|auto)/', $style, $height_match );
     605
     606                $width  = $width_match[1] ?? null;
     607                $height = $height_match[1] ?? null;
     608
     609                if ( ! empty( $width ) && ! empty( $height ) && $height !== 'auto') {
     610                    $img->setAttribute( 'width', intval( $width ) );
     611                    $img->setAttribute( 'height', intval( $height ) );
     612                } else {
     613                    list( $real_width, $real_height ) = getimagesize( $src );
     614
     615                    if ( ! empty( $width ) && $height === 'auto' ) {
     616                        $real_height = intval( $real_height * $width / $real_width );
     617                        $real_width  = intval( $width );
     618                    } elseif ( $width === 'auto' && ! empty( $height ) ) {
     619                        $real_width  = intval( $real_width * $height / $real_height );
     620                        $real_height = intval( $height );
     621                    }
     622                    $img->setAttribute( 'width', $real_width );
     623                    $img->setAttribute( 'height', $real_height );
     624                }
     625            } else {
     626                // No hay información de estilo, obtener el tamaño real
     627                list( $real_width, $real_height ) = getimagesize( $src );
     628                $img->setAttribute( 'width', $real_width );
     629                $img->setAttribute( 'height', $real_height );
     630            }
     631
     632        }
     633
     634        return $doc->saveHTML();
     635    }
     636
     637    /**
     638     * Get available PDF fonts
     639     *
     640     * @return array
     641     */
     642    public function get_available_pdf_fonts() {
     643        return $this->available_pdf_fonts;
     644    }
     645
     646    /**
     647     * Add available PDF fonts
     648     *
     649     * @param string $font Font to add.
     650     */
     651    public function add_available_pdf_fonts( $font ) {
     652        $this->available_pdf_fonts[] = $font;
     653    }
     654
     655    /**
     656     * Get custom PDF fonts
     657     *
     658     * @return string
     659     */
     660    public static function get_custom_pdf_fonts() {
     661        $fonts = array(
     662            'roboto' => array(
     663                array( // Regular.
     664                    array(
     665                        'family' => 'Roboto',
     666                        'style'  => 'normal',
     667                        'weight' => 'normal',
     668                    ),
     669                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-regular.ttf',
     670                ),
     671                array( // 500.
     672                    array(
     673                        'family' => 'Roboto',
     674                        'style'  => 'normal',
     675                        'weight' => '500',
     676                    ),
     677                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-500.ttf',
     678                ),
     679                array( // 700.
     680                    array(
     681                        'family' => 'Roboto',
     682                        'style'  => 'normal',
     683                        'weight' => '700',
     684                    ),
     685                    FIRMAFY_PLUGIN_PATH . 'includes/fonts-pdf/roboto-700.ttf',
     686                ),
     687            ),
     688        );
     689        return apply_filters( 'firmafy_custom_font_path', $fonts );
     690    }
     691
     692    /**
     693     * Get custom PDF font
     694     *
     695     * @param string $font Font to get.
     696     * @return string
     697     */
     698    public static function get_custom_pdf_font( $font ) {
     699        $fonts = self::get_custom_pdf_fonts();
     700        return isset( $fonts[ $font ] ) ? $fonts[ $font ] : array();
     701    }
     702
     703    /**
     704     * Check if font is custom
     705     *
     706     * @param string $font Font to check.
     707     * @return boolean
     708     */
     709    public static function font_is_custom( $font ) {
     710        $base_fonts = array(
     711            'courier',
     712            'helvetica',
     713            'times',
     714            'zapfdingbats',
     715        );
     716
     717        return in_array( $font, $base_fonts, true ) ? false : true;
     718    }
     719
     720    /**
     721     * Get Gutenberg CSS
     722     *
     723     * @return string
     724     */
     725    public static function get_gutenberg_css() {
     726        $combined = '';
     727   
     728        if ( file_exists( ABSPATH . 'wp-includes/css/dist/block-library/style.css' ) ) {
     729            $combined .= file_get_contents( ABSPATH . 'wp-includes/css/dist/block-library/style.css' );
     730        }
     731
     732        if ( file_exists( ABSPATH . 'wp-includes/css/dist/block-library/theme.css' ) ) {
     733            $combined .= file_get_contents( ABSPATH . 'wp-includes/css/dist/block-library/theme.css' );
     734        }
     735
     736        return $combined;
     737    }
     738
     739
     740    /**
     741     * Get block dynamic CSS
     742     *
     743     * @return string
     744     */
     745    public static function get_block_dynamic_css() {
     746        $css_url  = admin_url('load-styles.php?c=1&dir=ltr&load=wp-block-library,wp-block-editor,wp-block-editor-content,wp-editor,wp-components');
     747        $response = file_get_contents( $css_url );
     748        return $response;
     749    }
     750
     751    /**
     752     * Get template content
     753     *
     754     * @param integer $template_id Template ID.
     755     * @return string
     756     */
     757    public static function get_template_content( $template_id ) {
     758        $_post  = get_post( $template_id );
     759        $blocks = parse_blocks( $_post->post_content );
     760
     761        ob_start();
     762        foreach ( $blocks as $block ) {
     763            echo render_block( $block );
     764        }
     765
     766        return ob_get_clean();
     767    }
     768
     769    /**
     770     * Get CSS defined vars
     771     *
     772     * @return string
     773     */
     774    public static function get_css_defined_vars() {
     775        // Get the global colors.
     776        $global_colors = wp_get_global_settings( array( 'color', 'palette', 'theme' ) );
     777        $css           = '';
     778
     779        if ( isset( $global_colors['palette'] ) && is_array( $global_colors['palette'] ) ) {
     780            foreach ( $global_colors['palette'] as $color ) {
     781                $slug        = isset( $color['slug'] ) ? $color['slug'] : '';
     782                $color_value = isset( $color['color'] ) ? $color['color'] : '';
     783
     784                if ( $slug && $color_value ) {
     785                    $css .= "
     786                        .has-{$slug}-color {
     787                                color: {$color_value};
     788                        }
     789                        .has-{$slug}-background-color {
     790                                background-color: {$color_value};
     791                        }
     792                    ";
     793                }
     794            }
     795        }
     796
     797        return $css;
     798    }
     799
     800    /**
     801     * Get the attachment absolute path from its url
     802     *
     803     * @param string $url the attachment url to get its absolute path
     804     *
     805     * @return bool|string It returns the absolute path of an attachment
     806     */
     807    public static function attachment_url_to_path( $url )
     808    {
     809        $parsed_url = parse_url( $url );
     810       
     811        if ( empty( $parsed_url['path'] ) ) {
     812            return false;
     813        }
     814       
     815        $file = ABSPATH . ltrim( $parsed_url['path'], '/');
     816       
     817        return file_exists( $file ) ? $file : false;
     818    }
     819
    473820}
    474821
  • firmafy/trunk/includes/forms/class-contactform7.php

    r3050518 r3156914  
    152152    public function firmafy_process_entry( $obj ) {
    153153        global $helpers_firmafy;
    154         $cf7_firmafy    = get_option( 'cf7_firmafy_' . $obj->id() );
    155         $submission = WPCF7_Submission::get_instance();
     154        $cf7_firmafy = get_option( 'cf7_firmafy_' . $obj->id() );
     155        $submission  = WPCF7_Submission::get_instance();
    156156
    157157        if ( $cf7_firmafy ) {
    158             $merge_vars = $this->get_merge_vars( $cf7_firmafy, $submission->get_posted_data() );
     158            $merge_vars      = $this->get_merge_vars( $cf7_firmafy, $submission->get_posted_data() );
    159159            $signers         = $helpers_firmafy->filter_signers( $cf7_firmafy );
    160160            $response_result = $helpers_firmafy->create_entry( $cf7_firmafy['firmafy_template'], $merge_vars, $signers );
  • firmafy/trunk/includes/forms/class-gravityforms.php

    r3081802 r3156914  
    171171        global $helpers_firmafy;
    172172
    173         if ( ! empty( $feed['meta']['listFields_first_name'] ) ) {
    174             $name = $this->get_name( $entry, $feed['meta']['listFields_first_name'] );
    175         }
    176 
    177173        $merge_vars = array();
    178174        $field_maps = $this->get_field_map_fields( $feed, 'listFields' );
     
    182178            foreach ( $field_maps as $var_key => $field_id ) {
    183179                $field      = RGFormsModel::get_field( $form, $field_id );
     180
     181                if ( ! $field ) {
     182                    continue;
     183                }
     184
    184185                $field_type = RGFormsModel::get_input_type( $field );
    185186
     
    237238        }
    238239
    239         $override_custom_fields = apply_filters( 'firmafy_override_blank_custom_fields', false, $entry, $form, $feed );
    240         if ( ! $override_custom_fields ) {
    241             $merge_vars = $this->remove_blank_custom_fields( $merge_vars );
    242         }
    243 
    244240        $template        = isset( $feed['meta']['firmafy_template'] ) ? $feed['meta']['firmafy_template'] : '';
    245241        $signers         = $helpers_firmafy->filter_signers( $feed['meta'] );
    246         $response_result = $helpers_firmafy->create_entry( $template, $merge_vars, $signers );
     242        $response_result = $helpers_firmafy->create_entry( $template, $merge_vars, $signers, $entry['id'] );
    247243        $api_status      = isset( $response_result['status'] ) ? $response_result['status'] : '';
    248244
     245        $status = 'success';
    249246        if ( 'error' === $api_status ) {
    250             $this->add_note( $entry['id'], 'Error ' . $response_result['message'], 'error' );
     247            $message = sprintf(
     248                /* translators: %s: Sign error */
     249                __( 'Error creating Firmafy Sign: %s', 'firmafy' ),
     250                sanitize_text_field( $response_result['message'] )
     251            );
     252            $status = 'error';
    251253        } else {
    252             $this->add_note( $entry['id'], 'Success creating ' . esc_html( 'Firmafy' ) . ' Entry ID:' . $response_result['id'], 'success' );
    253         }
    254     }
    255 
    256     /**
    257      * Remove blank custom fields
    258      *
    259      * @param  array $merge_vars Vars to send to API.
    260      * @return array
    261      */
    262     private static function remove_blank_custom_fields( $merge_vars ) {
    263         $i = 0;
    264 
    265         $count = count( $merge_vars );
    266 
    267         for ( $i = 0; $i < $count; $i++ ) {
    268             if ( rgblank( $merge_vars[ $i ]['value'] ) ) {
    269                 unset( $merge_vars[ $i ] );
    270             }
    271         }
    272         // resort the array because items could have been removed, this will give an error from CRM if the keys are not in numeric sequence.
    273         sort( $merge_vars );
    274         return $merge_vars;
    275     }
    276 
    277     private function get_name( $entry, $field_id ) {
    278 
    279         // If field is simple (one input), simply return full content.
    280         $name = rgar( $entry, $field_id );
    281         if ( ! empty( $name ) ) {
    282             return $name;
    283         }
    284 
    285         // Complex field (multiple inputs). Join all pieces and create name.
    286         $prefix = trim( rgar( $entry, $field_id . '.2' ) );
    287         $first  = trim( rgar( $entry, $field_id . '.3' ) );
    288         $last   = trim( rgar( $entry, $field_id . '.6' ) );
    289         $suffix = trim( rgar( $entry, $field_id . '.8' ) );
    290 
    291         $name = $prefix;
    292         $name .= ! empty( $name ) && ! empty( $first ) ? " $first" : $first;
    293         $name .= ! empty( $name ) && ! empty( $last ) ? " $last" : $last;
    294         $name .= ! empty( $name ) && ! empty( $suffix ) ? " $suffix" : $suffix;
    295 
    296         return $name;
    297     }
    298 
    299 } //from main class
    300 
     254            $message = sprintf(
     255                /* translators: %s: Sign entry ID */
     256                __( 'Success creating Firmafy Sign ID: %s', 'firmafy' ),
     257                sanitize_text_field( $response_result['id'] )
     258            );
     259        }
     260        $this->add_note( $entry['id'], $message, $status );
     261    }
     262}
  • firmafy/trunk/includes/forms/class-woocommerce.php

    r3050518 r3156914  
    137137        if ( 'orders' === $woocommerce_mode || 'all' === $woocommerce_mode ) {
    138138            $template_id     = wc_terms_and_conditions_page_id();
    139             $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), true );
     139            $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), $order_id, true );
    140140
    141141            if ( 'error' === $response_result['status'] ) {
     
    177177                    );
    178178                }
    179                 $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), true );
     179                $response_result = $helpers_firmafy->create_entry( $template_id, $merge_vars, array(), $order_id, true );
    180180
    181181                if ( 'error' === $response_result['status'] ) {
  • firmafy/trunk/readme.txt

    r3081802 r3156914  
    11=== Firmafy eSignature ===
    2 Contributors: closetechnology, davidperez, sacrajaimez, firmafy
     2Contributors: closetechnology, davidperez, sacrajaimez, firmafy, alexbreagarcia
    33Tags: forms, signature, gravityforms, contact form 7, woocommerce
    44Requires at least: 4.0
    55Requires PHP: 5.6
    6 Tested up to: 6.5
    7 Stable tag: 1.2.1
    8 Version: 1.2.1
     6Tested up to: 6.6
     7Stable tag: 1.3.0
     8Version: 1.3.0
    99License: GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6969- Country: {pais}
    7070- Payment method: {metodo_pago}
     71- Reference: {referencia}
     72- Page break: {salto_pagina}
    7173
    7274**Firmafy use examples:**
     
    9193
    9294== Changelog ==
     95= 1.3.0 =
     96*  Added field {referencia} and get the ID of the form entry or order id. Useful to use in templates.
     97*  Added: Page break in PDF. Use {salto_pagina} for that.
     98*  Added: Name of template in the PDF file.
     99*  Fix: Process conflicts with images and styles size.
     100*  Fix: Empty variable didn't show in the template.
     101*  Fix: Gets the id of sign to the form entry.
     102*  Fix: Empty value of form, wasn't gives empty value in the template.
     103*  Added: Option to define the line height on p tags.
     104*  Added: Support for Gutenberg blocks.
     105*  Added: Font selector for PDF.
     106*  Added: Font Roboto to default font list.
     107*  Added: Upload a image and set it as background image to the PDF.
     108
    93109= 1.2.1 =
    94110*  Added: Support Gravity Forms Field name.
  • firmafy/trunk/vendor/autoload.php

    r3050518 r3156914  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82::getLoader();
     25return ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457::getLoader();
  • firmafy/trunk/vendor/composer/ClassLoader.php

    r3050518 r3156914  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • firmafy/trunk/vendor/composer/InstalledVersions.php

    r3050518 r3156914  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     332                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • firmafy/trunk/vendor/composer/autoload_classmap.php

    r3050518 r3156914  
    88return array(
    99    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    10     'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
    11     'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
    12     'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    13     'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php',
    14     'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
    15     'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
    16     'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
    17     'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
    18     'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
    19     'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
    20     'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php',
    21     'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php',
    22     'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php',
    23     'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     10    'Dompdf\\Cpdf' => $vendorDir . '/dompdf/dompdf/lib/Cpdf.php',
    2411);
  • firmafy/trunk/vendor/composer/autoload_psr4.php

    r3050518 r3156914  
    77
    88return array(
    9     'Spipu\\Html2Pdf\\' => array($vendorDir . '/spipu/html2pdf/src'),
     9    'Svg\\' => array($vendorDir . '/dompdf/php-svg-lib/src/Svg'),
     10    'Sabberworm\\CSS\\' => array($vendorDir . '/sabberworm/php-css-parser/src'),
     11    'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'),
     12    'FontLib\\' => array($vendorDir . '/dompdf/php-font-lib/src/FontLib'),
     13    'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'),
    1014);
  • firmafy/trunk/vendor/composer/autoload_real.php

    r3050518 r3156914  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82
     5class ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitf7a013e83c48e2a08afd0e9e008f8b82', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit13c2ea380f6f598f89b9cfcbd5fd6457', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • firmafy/trunk/vendor/composer/autoload_static.php

    r2763052 r3156914  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82
     7class ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457
    88{
    99    public static $prefixLengthsPsr4 = array (
    1010        'S' =>
    1111        array (
    12             'Spipu\\Html2Pdf\\' => 15,
     12            'Svg\\' => 4,
     13            'Sabberworm\\CSS\\' => 15,
     14        ),
     15        'M' =>
     16        array (
     17            'Masterminds\\' => 12,
     18        ),
     19        'F' =>
     20        array (
     21            'FontLib\\' => 8,
     22        ),
     23        'D' =>
     24        array (
     25            'Dompdf\\' => 7,
    1326        ),
    1427    );
    1528
    1629    public static $prefixDirsPsr4 = array (
    17         'Spipu\\Html2Pdf\\' =>
     30        'Svg\\' =>
    1831        array (
    19             0 => __DIR__ . '/..' . '/spipu/html2pdf/src',
     32            0 => __DIR__ . '/..' . '/dompdf/php-svg-lib/src/Svg',
     33        ),
     34        'Sabberworm\\CSS\\' =>
     35        array (
     36            0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/src',
     37        ),
     38        'Masterminds\\' =>
     39        array (
     40            0 => __DIR__ . '/..' . '/masterminds/html5/src',
     41        ),
     42        'FontLib\\' =>
     43        array (
     44            0 => __DIR__ . '/..' . '/dompdf/php-font-lib/src/FontLib',
     45        ),
     46        'Dompdf\\' =>
     47        array (
     48            0 => __DIR__ . '/..' . '/dompdf/dompdf/src',
    2049        ),
    2150    );
     
    2352    public static $classMap = array (
    2453        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    25         'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
    26         'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
    27         'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
    28         'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php',
    29         'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
    30         'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
    31         'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
    32         'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
    33         'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
    34         'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
    35         'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php',
    36         'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php',
    37         'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php',
    38         'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php',
     54        'Dompdf\\Cpdf' => __DIR__ . '/..' . '/dompdf/dompdf/lib/Cpdf.php',
    3955    );
    4056
     
    4258    {
    4359        return \Closure::bind(function () use ($loader) {
    44             $loader->prefixLengthsPsr4 = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$prefixLengthsPsr4;
    45             $loader->prefixDirsPsr4 = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$prefixDirsPsr4;
    46             $loader->classMap = ComposerStaticInitf7a013e83c48e2a08afd0e9e008f8b82::$classMap;
     60            $loader->prefixLengthsPsr4 = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$prefixLengthsPsr4;
     61            $loader->prefixDirsPsr4 = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$prefixDirsPsr4;
     62            $loader->classMap = ComposerStaticInit13c2ea380f6f598f89b9cfcbd5fd6457::$classMap;
    4763
    4864        }, null, ClassLoader::class);
  • firmafy/trunk/vendor/composer/installed.json

    r3050518 r3156914  
    22    "packages": [
    33        {
    4             "name": "spipu/html2pdf",
    5             "version": "v5.2.8",
    6             "version_normalized": "5.2.8.0",
    7             "source": {
    8                 "type": "git",
    9                 "url": "https://github.com/spipu/html2pdf.git",
    10                 "reference": "6c94dcd48c94c6c73f206629839c1ebd81e8c726"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/spipu/html2pdf/zipball/6c94dcd48c94c6c73f206629839c1ebd81e8c726",
    15                 "reference": "6c94dcd48c94c6c73f206629839c1ebd81e8c726",
    16                 "shasum": ""
    17             },
    18             "require": {
     4            "name": "dompdf/dompdf",
     5            "version": "v3.0.0",
     6            "version_normalized": "3.0.0.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/dompdf/dompdf.git",
     10                "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/dompdf/dompdf/zipball/fbc7c5ee5d94f7a910b78b43feb7931b7f971b59",
     15                "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "dompdf/php-font-lib": "^1.0.0",
     20                "dompdf/php-svg-lib": "^1.0.0",
     21                "ext-dom": "*",
     22                "ext-mbstring": "*",
     23                "masterminds/html5": "^2.0",
     24                "php": "^7.1 || ^8.0"
     25            },
     26            "require-dev": {
    1927                "ext-gd": "*",
     28                "ext-json": "*",
     29                "ext-zip": "*",
     30                "mockery/mockery": "^1.3",
     31                "phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10",
     32                "squizlabs/php_codesniffer": "^3.5",
     33                "symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
     34            },
     35            "suggest": {
     36                "ext-gd": "Needed to process images",
     37                "ext-gmagick": "Improves image processing performance",
     38                "ext-imagick": "Improves image processing performance",
     39                "ext-zlib": "Needed for pdf stream compression"
     40            },
     41            "time": "2024-04-29T14:01:28+00:00",
     42            "type": "library",
     43            "installation-source": "dist",
     44            "autoload": {
     45                "psr-4": {
     46                    "Dompdf\\": "src/"
     47                },
     48                "classmap": [
     49                    "lib/"
     50                ]
     51            },
     52            "notification-url": "https://packagist.org/downloads/",
     53            "license": [
     54                "LGPL-2.1"
     55            ],
     56            "authors": [
     57                {
     58                    "name": "The Dompdf Community",
     59                    "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
     60                }
     61            ],
     62            "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
     63            "homepage": "https://github.com/dompdf/dompdf",
     64            "support": {
     65                "issues": "https://github.com/dompdf/dompdf/issues",
     66                "source": "https://github.com/dompdf/dompdf/tree/v3.0.0"
     67            },
     68            "install-path": "../dompdf/dompdf"
     69        },
     70        {
     71            "name": "dompdf/php-font-lib",
     72            "version": "1.0.0",
     73            "version_normalized": "1.0.0.0",
     74            "source": {
     75                "type": "git",
     76                "url": "https://github.com/dompdf/php-font-lib.git",
     77                "reference": "991d6a954f6bbd7e41022198f00586b230731441"
     78            },
     79            "dist": {
     80                "type": "zip",
     81                "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/991d6a954f6bbd7e41022198f00586b230731441",
     82                "reference": "991d6a954f6bbd7e41022198f00586b230731441",
     83                "shasum": ""
     84            },
     85            "require": {
    2086                "ext-mbstring": "*",
    21                 "php": "^5.6 || ^7.0 || ^8.0",
    22                 "tecnickcom/tcpdf": "^6.3"
    23             },
    24             "require-dev": {
    25                 "phpunit/phpunit": "^5.0 || ^9.0"
     87                "php": "^7.1 || ^8.0"
     88            },
     89            "require-dev": {
     90                "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6"
     91            },
     92            "time": "2024-04-29T13:40:38+00:00",
     93            "type": "library",
     94            "installation-source": "dist",
     95            "autoload": {
     96                "psr-4": {
     97                    "FontLib\\": "src/FontLib"
     98                }
     99            },
     100            "notification-url": "https://packagist.org/downloads/",
     101            "license": [
     102                "LGPL-2.1-or-later"
     103            ],
     104            "authors": [
     105                {
     106                    "name": "The FontLib Community",
     107                    "homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
     108                }
     109            ],
     110            "description": "A library to read, parse, export and make subsets of different types of font files.",
     111            "homepage": "https://github.com/dompdf/php-font-lib",
     112            "support": {
     113                "issues": "https://github.com/dompdf/php-font-lib/issues",
     114                "source": "https://github.com/dompdf/php-font-lib/tree/1.0.0"
     115            },
     116            "install-path": "../dompdf/php-font-lib"
     117        },
     118        {
     119            "name": "dompdf/php-svg-lib",
     120            "version": "1.0.0",
     121            "version_normalized": "1.0.0.0",
     122            "source": {
     123                "type": "git",
     124                "url": "https://github.com/dompdf/php-svg-lib.git",
     125                "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af"
     126            },
     127            "dist": {
     128                "type": "zip",
     129                "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
     130                "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af",
     131                "shasum": ""
     132            },
     133            "require": {
     134                "ext-mbstring": "*",
     135                "php": "^7.1 || ^8.0",
     136                "sabberworm/php-css-parser": "^8.4"
     137            },
     138            "require-dev": {
     139                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
     140            },
     141            "time": "2024-04-29T13:26:35+00:00",
     142            "type": "library",
     143            "installation-source": "dist",
     144            "autoload": {
     145                "psr-4": {
     146                    "Svg\\": "src/Svg"
     147                }
     148            },
     149            "notification-url": "https://packagist.org/downloads/",
     150            "license": [
     151                "LGPL-3.0-or-later"
     152            ],
     153            "authors": [
     154                {
     155                    "name": "The SvgLib Community",
     156                    "homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md"
     157                }
     158            ],
     159            "description": "A library to read, parse and export to PDF SVG files.",
     160            "homepage": "https://github.com/dompdf/php-svg-lib",
     161            "support": {
     162                "issues": "https://github.com/dompdf/php-svg-lib/issues",
     163                "source": "https://github.com/dompdf/php-svg-lib/tree/1.0.0"
     164            },
     165            "install-path": "../dompdf/php-svg-lib"
     166        },
     167        {
     168            "name": "masterminds/html5",
     169            "version": "2.9.0",
     170            "version_normalized": "2.9.0.0",
     171            "source": {
     172                "type": "git",
     173                "url": "https://github.com/Masterminds/html5-php.git",
     174                "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
     175            },
     176            "dist": {
     177                "type": "zip",
     178                "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
     179                "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
     180                "shasum": ""
     181            },
     182            "require": {
     183                "ext-dom": "*",
     184                "php": ">=5.3.0"
     185            },
     186            "require-dev": {
     187                "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
     188            },
     189            "time": "2024-03-31T07:05:07+00:00",
     190            "type": "library",
     191            "extra": {
     192                "branch-alias": {
     193                    "dev-master": "2.7-dev"
     194                }
     195            },
     196            "installation-source": "dist",
     197            "autoload": {
     198                "psr-4": {
     199                    "Masterminds\\": "src"
     200                }
     201            },
     202            "notification-url": "https://packagist.org/downloads/",
     203            "license": [
     204                "MIT"
     205            ],
     206            "authors": [
     207                {
     208                    "name": "Matt Butcher",
     209                    "email": "technosophos@gmail.com"
     210                },
     211                {
     212                    "name": "Matt Farina",
     213                    "email": "matt@mattfarina.com"
     214                },
     215                {
     216                    "name": "Asmir Mustafic",
     217                    "email": "goetas@gmail.com"
     218                }
     219            ],
     220            "description": "An HTML5 parser and serializer.",
     221            "homepage": "http://masterminds.github.io/html5-php",
     222            "keywords": [
     223                "HTML5",
     224                "dom",
     225                "html",
     226                "parser",
     227                "querypath",
     228                "serializer",
     229                "xml"
     230            ],
     231            "support": {
     232                "issues": "https://github.com/Masterminds/html5-php/issues",
     233                "source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
     234            },
     235            "install-path": "../masterminds/html5"
     236        },
     237        {
     238            "name": "sabberworm/php-css-parser",
     239            "version": "v8.6.0",
     240            "version_normalized": "8.6.0.0",
     241            "source": {
     242                "type": "git",
     243                "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
     244                "reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70"
     245            },
     246            "dist": {
     247                "type": "zip",
     248                "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
     249                "reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
     250                "shasum": ""
     251            },
     252            "require": {
     253                "ext-iconv": "*",
     254                "php": ">=5.6.20"
     255            },
     256            "require-dev": {
     257                "phpunit/phpunit": "^5.7.27"
    26258            },
    27259            "suggest": {
    28                 "ext-gd": "Allows to embed images into the PDF",
    29                 "fagundes/zff-html2pdf": "if you need to integrate Html2Pdf with Zend Framework 2 (zf2)"
    30             },
    31             "time": "2023-07-18T14:52:59+00:00",
    32             "type": "library",
    33             "installation-source": "dist",
    34             "autoload": {
    35                 "psr-4": {
    36                     "Spipu\\Html2Pdf\\": "src/"
    37                 }
    38             },
    39             "notification-url": "https://packagist.org/downloads/",
    40             "license": [
    41                 "OSL-3.0"
    42             ],
    43             "authors": [
    44                 {
    45                     "name": "Spipu",
    46                     "homepage": "https://github.com/spipu",
    47                     "role": "Developer"
    48                 }
    49             ],
    50             "description": "Html2Pdf is a HTML to PDF converter written in PHP5 (it uses TCPDF). OFFICIAL PACKAGE",
    51             "homepage": "http://html2pdf.fr/",
     260                "ext-mbstring": "for parsing UTF-8 CSS"
     261            },
     262            "time": "2024-07-01T07:33:21+00:00",
     263            "type": "library",
     264            "extra": {
     265                "branch-alias": {
     266                    "dev-main": "9.0.x-dev"
     267                }
     268            },
     269            "installation-source": "dist",
     270            "autoload": {
     271                "psr-4": {
     272                    "Sabberworm\\CSS\\": "src/"
     273                }
     274            },
     275            "notification-url": "https://packagist.org/downloads/",
     276            "license": [
     277                "MIT"
     278            ],
     279            "authors": [
     280                {
     281                    "name": "Raphael Schweikert"
     282                },
     283                {
     284                    "name": "Oliver Klee",
     285                    "email": "github@oliverklee.de"
     286                },
     287                {
     288                    "name": "Jake Hotson",
     289                    "email": "jake.github@qzdesign.co.uk"
     290                }
     291            ],
     292            "description": "Parser for CSS Files written in PHP",
     293            "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
    52294            "keywords": [
    53                 "html",
    54                 "html2pdf",
    55                 "pdf"
    56             ],
    57             "support": {
    58                 "issues": "https://github.com/spipu/html2pdf/issues",
    59                 "source": "https://github.com/spipu/html2pdf/tree/v5.2.8"
    60             },
    61             "install-path": "../spipu/html2pdf"
    62         },
    63         {
    64             "name": "tecnickcom/tcpdf",
    65             "version": "6.6.5",
    66             "version_normalized": "6.6.5.0",
    67             "source": {
    68                 "type": "git",
    69                 "url": "https://github.com/tecnickcom/TCPDF.git",
    70                 "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce"
    71             },
    72             "dist": {
    73                 "type": "zip",
    74                 "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5fce932fcee4371865314ab7f6c0d85423c5c7ce",
    75                 "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce",
    76                 "shasum": ""
    77             },
    78             "require": {
    79                 "php": ">=5.3.0"
    80             },
    81             "time": "2023-09-06T15:09:26+00:00",
    82             "type": "library",
    83             "installation-source": "dist",
    84             "autoload": {
    85                 "classmap": [
    86                     "config",
    87                     "include",
    88                     "tcpdf.php",
    89                     "tcpdf_parser.php",
    90                     "tcpdf_import.php",
    91                     "tcpdf_barcodes_1d.php",
    92                     "tcpdf_barcodes_2d.php",
    93                     "include/tcpdf_colors.php",
    94                     "include/tcpdf_filters.php",
    95                     "include/tcpdf_font_data.php",
    96                     "include/tcpdf_fonts.php",
    97                     "include/tcpdf_images.php",
    98                     "include/tcpdf_static.php",
    99                     "include/barcodes/datamatrix.php",
    100                     "include/barcodes/pdf417.php",
    101                     "include/barcodes/qrcode.php"
    102                 ]
    103             },
    104             "notification-url": "https://packagist.org/downloads/",
    105             "license": [
    106                 "LGPL-3.0-or-later"
    107             ],
    108             "authors": [
    109                 {
    110                     "name": "Nicola Asuni",
    111                     "email": "info@tecnick.com",
    112                     "role": "lead"
    113                 }
    114             ],
    115             "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
    116             "homepage": "http://www.tcpdf.org/",
    117             "keywords": [
    118                 "PDFD32000-2008",
    119                 "TCPDF",
    120                 "barcodes",
    121                 "datamatrix",
    122                 "pdf",
    123                 "pdf417",
    124                 "qrcode"
    125             ],
    126             "support": {
    127                 "issues": "https://github.com/tecnickcom/TCPDF/issues",
    128                 "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.5"
    129             },
    130             "funding": [
    131                 {
    132                     "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
    133                     "type": "custom"
    134                 }
    135             ],
    136             "install-path": "../tecnickcom/tcpdf"
     295                "css",
     296                "parser",
     297                "stylesheet"
     298            ],
     299            "support": {
     300                "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
     301                "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.6.0"
     302            },
     303            "install-path": "../sabberworm/php-css-parser"
    137304        }
    138305    ],
    139     "dev": true,
     306    "dev": false,
    140307    "dev-package-names": []
    141308}
  • firmafy/trunk/vendor/composer/installed.php

    r3050518 r3156914  
    22    'root' => array(
    33        'name' => '__root__',
    4         'pretty_version' => 'dev-develop',
    5         'version' => 'dev-develop',
    6         'reference' => 'e2793614c9f9e652064a45c89d55c60497cd114d',
     4        'pretty_version' => '1.3.0',
     5        'version' => '1.3.0.0',
     6        'reference' => '4982c0d707bb4bab7b40992ae1b5f09580faf029',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
    99        'aliases' => array(),
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
    1313        '__root__' => array(
    14             'pretty_version' => 'dev-develop',
    15             'version' => 'dev-develop',
    16             'reference' => 'e2793614c9f9e652064a45c89d55c60497cd114d',
     14            'pretty_version' => '1.3.0',
     15            'version' => '1.3.0.0',
     16            'reference' => '4982c0d707bb4bab7b40992ae1b5f09580faf029',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    2020            'dev_requirement' => false,
    2121        ),
    22         'spipu/html2pdf' => array(
    23             'pretty_version' => 'v5.2.8',
    24             'version' => '5.2.8.0',
    25             'reference' => '6c94dcd48c94c6c73f206629839c1ebd81e8c726',
     22        'dompdf/dompdf' => array(
     23            'pretty_version' => 'v3.0.0',
     24            'version' => '3.0.0.0',
     25            'reference' => 'fbc7c5ee5d94f7a910b78b43feb7931b7f971b59',
    2626            'type' => 'library',
    27             'install_path' => __DIR__ . '/../spipu/html2pdf',
     27            'install_path' => __DIR__ . '/../dompdf/dompdf',
    2828            'aliases' => array(),
    2929            'dev_requirement' => false,
    3030        ),
    31         'tecnickcom/tcpdf' => array(
    32             'pretty_version' => '6.6.5',
    33             'version' => '6.6.5.0',
    34             'reference' => '5fce932fcee4371865314ab7f6c0d85423c5c7ce',
     31        'dompdf/php-font-lib' => array(
     32            'pretty_version' => '1.0.0',
     33            'version' => '1.0.0.0',
     34            'reference' => '991d6a954f6bbd7e41022198f00586b230731441',
    3535            'type' => 'library',
    36             'install_path' => __DIR__ . '/../tecnickcom/tcpdf',
     36            'install_path' => __DIR__ . '/../dompdf/php-font-lib',
     37            'aliases' => array(),
     38            'dev_requirement' => false,
     39        ),
     40        'dompdf/php-svg-lib' => array(
     41            'pretty_version' => '1.0.0',
     42            'version' => '1.0.0.0',
     43            'reference' => 'eb045e518185298eb6ff8d80d0d0c6b17aecd9af',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../dompdf/php-svg-lib',
     46            'aliases' => array(),
     47            'dev_requirement' => false,
     48        ),
     49        'masterminds/html5' => array(
     50            'pretty_version' => '2.9.0',
     51            'version' => '2.9.0.0',
     52            'reference' => 'f5ac2c0b0a2eefca70b2ce32a5809992227e75a6',
     53            'type' => 'library',
     54            'install_path' => __DIR__ . '/../masterminds/html5',
     55            'aliases' => array(),
     56            'dev_requirement' => false,
     57        ),
     58        'sabberworm/php-css-parser' => array(
     59            'pretty_version' => 'v8.6.0',
     60            'version' => '8.6.0.0',
     61            'reference' => 'd2fb94a9641be84d79c7548c6d39bbebba6e9a70',
     62            'type' => 'library',
     63            'install_path' => __DIR__ . '/../sabberworm/php-css-parser',
    3764            'aliases' => array(),
    3865            'dev_requirement' => false,
  • firmafy/trunk/vendor/composer/platform_check.php

    r2763052 r3156914  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 50600)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 70100)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
Note: See TracChangeset for help on using the changeset viewer.