Get card number

If no "card number" value has been set, this method will
set and return a default "card number" value,
if any such value is available

@see getDefaultCardNumber()

@return string|null card number or null if no card number has been set
434742
public function getCardNumber() : ?string 
    {
        if ( ! $this->hasCardNumber()) {
            $this->setCardNumber($this->getDefaultCardNumber());
        }
        return $this->cardNumber;
    }
561479
public function getCardReference()
    {
        if (isset($this->data['object']) && 'customer' === $this->data['object']) {
            if (isset($this->data['default_source']) && !empty($this->data['default_source'])) {
                return $this->data['default_source'];
            }

            if (isset($this->data['default_card']) && !empty($this->data['default_card'])) {
                return $this->data['default_card'];
            }
            
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'card' === $this->data['object']) {
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            if (! empty($this->data['source'])) {
                if (! empty($this->data['source']['id'])) {
                    return $this->data['source']['id'];
                }
            }
        }

        return null;
    }
741001
private function getDefaultStoreId()
    {
        $store = $this->storeManager->getDefaultStoreView();

        if (null === $store) {
            // Occurs when current user does not have access to default website (due to AdminGWS ACLS on Magento EE).
            $store = !empty($this->storeManager->getWebsites()) ? current($this->storeManager->getWebsites())->getDefaultStore() : null;
        }

        return $store ? $store->getId() : 0;
    }
429070
protected function _getDefaultValues()
    {
        $teamComponent = $this->_data->parent->parent->parent;
        if (Kwc_Abstract::hasSetting($teamComponent->componentClass, 'defaultVcardValues')) {
            $setting = Kwc_Abstract::getSetting($teamComponent->componentClass, 'defaultVcardValues');
        }

        if (isset($setting)) {
            return $setting;
        } else {
            return Kwc_Abstract::getSetting($this->_data->componentClass, 'defaultVcardValues');
        }
    }
531673
public function getCreditCard()
    {
        if ($this->type == self::PAYMENT_INSTRUMENT_TYPE_CREDIT_CARD && !empty($this->data)) {
            return $this->data;
        }

        return null;
    }
877864
public static function getDefault()
    {
        if ((self::$compatibilityMode === true) or (func_num_args() > 0)) {
            if (!self::$_breakChain) {
                self::$_breakChain = true;
                trigger_error('You are running Zend_Locale in compatibility mode... please migrate your scripts', E_USER_NOTICE);
                $params = func_get_args();
                $param = null;
                if (isset($params[0])) {
                    $param = $params[0];
                }
                return self::getOrder($param);
            }

            self::$_breakChain = false;
        }

        return self::$_default;
    }
1170660
public function getPhpSafeDefaultValue()
    {
        $value     = $this->getDefaultValue();
        $is_string = $this->hasType() && $this->getType()->getName() === 'string';

        if ($value === true) {
            return 'true';
        } elseif ($value === false) {
            return 'false';
        } elseif ($this->isDefaultValueConstant()) {
            if (strpos($this->getDefaultValueConstantName(), 'self') === 0) {
                return $this->getDefaultValueConstantName();
            }
            return '\\' . $this->getDefaultValueConstantName();
        } elseif (is_array($value)) {
            return '[]';
        } elseif (null === $value || ($is_string && $value === 'null' && $this->allowsNull())) {
            return 'null';
        } elseif (is_numeric($value) && !$is_string) {
            return (string) $value;
        }
        return var_export($value, true);
    }
51197
public function getShippingId()
    {
        if (!$this->_sShippingSetId) {
            $this->_sShippingSetId = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet');
        }

        $sActPaymentId = $this->getPaymentId();
        // setting default if none is set
        if (!$this->_sShippingSetId && $sActPaymentId != 'oxempty') {
            $oUser = $this->getUser();

            // choosing first preferred delivery set
            list(, $sActShipSet) = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)->getDeliverySetData(null, $oUser, $this);
            // in case nothing was found and no user set - choosing default
            $this->_sShippingSetId = $sActShipSet ? $sActShipSet : ($oUser ? null : 'oxidstandard');
        } elseif (!$this->isAdmin() && $sActPaymentId == 'oxempty') {
            // in case 'oxempty' is payment id - delivery set must be reset
            $this->_sShippingSetId = null;
        }

        return $this->_sShippingSetId;
    }
226449
protected function initDefault()
    {
        if ($this->isCli()) {
            return null;
        }

        $uri = (empty($_SERVER['HTTPS']) ? 'http' : 'https')
            . '://'
            . $_SERVER['HTTP_HOST']
            . $_SERVER['REQUEST_URI'];
        return  rtrim(preg_replace('/\?.*/', '', $uri), '/');
    }
740629
public function getDefaultValue()
    {
        if (!$this->hasDefaultValue) {
            throw new \LogicException(sprintf('Argument $%s does not have a default value. Use %s::hasDefaultValue() to avoid this exception.', $this->name, __CLASS__));
        }

        return $this->defaultValue;
    }
1077411
public function getCardReference()
    {
        if (isset($this->data['object']) && 'card' === $this->data['object']) {
            if (! empty($this->data['id'])) {
                return $this->data['id'];
            }
        } elseif (isset($this->data['object']) && 'transaction' === $this->data['object']) {
            return $this->data['card']['id'];
        }

        return null;
    }
81430
public function getIban() : ?string 
    {
        if ( ! $this->hasIban()) {
            $this->setIban($this->getDefaultIban());
        }
        return $this->iban;
    }
145770
@Override
	public Object getDefaultValue() {

		Indexed indexedAnnotation = getIndexAnnotation();
		if (indexedAnnotation != null && StringUtils.hasText(indexedAnnotation.defaultValue())) {
			return indexedAnnotation.defaultValue();
		}
		return null;
	}
136344
public function getValue() {
        if (!is_null($this->value))
            return $this->value;
        $value = $this->getArrayValue($this->form->method == 'POST' ? $_POST : $_GET, $this->getName());
        if ($value) {
            return $value;
        }
        $key = null;
        if (false !== strpos($this->name, '[')){
            $name = explode('[', $this->name, 2);
            $key = substr($name[1], 0, strlen($name[1]) - 1);
            $name = $name[0];
        } else {
            $name = $this->name;
        }
        if ($this->form->model && is_object($this->form->model) && (!$this->form->model->isNewRecord() || $this->form->model->$name)) {
            $val = $this->form->model->$name;
            if (!is_null($key)){
                return isset($val[$key])?$val[$key]:null;
            } else {
                return $val;
            }
        }
        return $this->defaultValue;
    }
311068
public function getCustomerReference()
    {
        if (isset($this->data['object']) && 'customer' === $this->data['object']) {
            return $this->data['id'];
        }
        if (isset($this->data['object']) && 'transaction' === $this->data['object']) {
            if (! empty($this->data['customer'])) {
                return $this->data['customer']['id'];
            }
        }
        if (isset($this->data['object']) && 'card' === $this->data['object']) {
            if (! empty($this->data['customer'])) {
                return $this->data['customer']['id'];
            }
        }

        return null;
    }
85853
public function getDefault()
    {
        if ($this->reflection->isDefaultValueAvailable()
            and $default = $this->reflection->getDefaultValue()
        ) {
            if (is_scalar($default)) {
                return $default;
            } else {
                return $this->tostring($default);
            }
        }
        if ($this->reflection->isArray()) {
            return '[]';
        }
        if ($this->isPassedByReference()) {
            return 'null';
        } elseif ($this->reflection->getClass()) {
            // This gets injected as a new instance.
            return null;
        }
        $type = $this->getType();
        if (!$type) {
            $type = $this->extractParameterData();
        }
        // Guesstimated values:
        switch ($type) {
            case 'int': case 'integer': case 'float':
                return 0;
            case 'string':
                return "''";
            case 'array':
                return '[]';
        }
        return null;
    }
1342315
public function getId() : ?string 
    {
        if ( ! $this->hasId()) {
            $this->setId($this->getDefaultId());
        }
        return $this->id;
    }