AlkantarClanX12

Your IP : 216.73.217.24


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/plugins/leadbox/classes/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/plugins/leadbox/classes/lead.php

<?php if (!defined('ABSPATH')) exit;

/**
 * Lead Object
 * This object encapsulates the data needed to create a lead.
 * It has a set of invalid properties to avoid sending additional
 * properties that will be added as metadata of the Lead. It implements
 * two magic functions to allow new properties to be easily stored inside it
 * without need to have a code change in the future. 
 */
final class LB_Lead_Dto
{

    private $lead = array();
    private $invalid_properties = array('grecaptcha', 'g-recaptcha-response', 'subject', 'recipient', 'body', 'sender', 'use_html', '_wp*');

    public function __set($name, $value)
    {
        if (in_array(($name), $this->invalid_properties)) {
            $this->lead[$name] = $value;
        }
    }

    public function __get($name)
    {
        if (in_array(($name), $this->invalid_properties)) {
            if (!array_key_exists($name, $this->lead)) {
                if (!$this->startsWith($name, '_wp')) {
                    return $this->lead[$name];
                }
            }
        }

        return null;
    }

    public function __isset($name)
    {
        return isset($this->lead[$name]);
    }

    public function __unset($name)
    {
        unset($this->lead[$name]);
    }

    public function ToArray()
    {
        $data = $this->lead;
        return $data;
    }

    public function startsWith($haystack, $needle)
    {
        // search backwards starting from haystack length characters from the end
        return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
    }

    public function endsWith($haystack, $needle)
    {
        // search forward starting from end minus needle length characters
        return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);
    }

    public function FromArray($data)
    {

        if (!is_array($data)) {
            throw new Exception('$data is not a valid array');
        }

        foreach ($data as $key => $val) {
            if (!in_array(($key), $this->invalid_properties)) {
                if (!$this->startsWith($key, '_wp')) {
                    if (substr($key, 0, 4) != "html") {
                        $this->lead[$key] = $val;    
                    }
                }
            }
        }
    }

    public function getFormId() {
      return isset($this->lead['form_id']) ? intval($this->lead['form_id']) : 0;
    }
}

Home - Capital GMC Buick Regina

No data

Welcome to Capital GMC BUICK – REGINA

Thank you for choosing Capital GMC Buick | Regina, your premier certified Buick and GMC dealership proudly serving drivers in Regina and the surrounding communities. Whether you’re searching for a brand-new Buick or GMC vehicle or a meticulously inspected pre-owned model, we have a diverse selection to match your needs and lifestyle.

Beyond our impressive inventory, we offer a seamless and stress-free financing experience through our well-connected finance centre, where our team of experts is dedicated to securing the best loan or lease options for you, quickly, transparently, and hassle-free.

But our commitment to you doesn’t stop at the sale. Our state-of-the-art service centre is staffed with skilled Buick and GMC technicians who use the latest equipment and genuine OEM parts to keep your vehicle running at its best. From routine maintenance to complex repairs, we’ve got you covered.

Experience top-tier customer service, quality vehicles, and expert care, all in one place. Visit Capital GMC Buick | Regina today or call us at 306-205-8072 with any questions. We’re here to help!

Ask a Question