HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/magento.bikenow.co/vendor/magento/module-customer/ViewModel/Address.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Customer\ViewModel;

use Magento\Directory\Helper\Data as DataHelper;
use Magento\Customer\Helper\Address as AddressHelper;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\View\Element\Block\ArgumentInterface;

 /**
  * Custom address view model
  */
class Address implements ArgumentInterface
{
    /**
     * @var DataHelper
     */
    private $helperData;

    /**
     * @var AddressHelper
     */
    private $helperAddress;

    /**
     * Constructor
     *
     * @param DataHelper $helperData
     * @param AddressHelper $helperAddress
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function __construct(
        DataHelper $helperData,
        AddressHelper $helperAddress
    ) {
        $this->helperData= $helperData;
        $this->helperAddress= $helperAddress;
    }

    /**
     * Get string with frontend validation classes for attribute
     *
     * @param string $attributeCode
     * @return string
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function dataGetAttributeValidationClass($attributeCode)
    {
        return $this->helperData->getAttributeValidationClass($attributeCode);
    }

    /**
     * Get string with frontend validation classes for attribute
     *
     * @param string $attributeCode
     * @return string
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function addressGetAttributeValidationClass($attributeCode)
    {
        return $this->helperAddress->getAttributeValidationClass($attributeCode);
    }

    /**
     * Return Number of Lines in a Street Address for store
     *
     * @param \Magento\Store\Model\Store|int|string $store
     *
     * @return int
     * @throws NoSuchEntityException
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function addressGetStreetLines()
    {
        return $this->helperAddress->getStreetLines();
    }

    /**
     * Check if VAT ID address attribute has to be shown on frontend (on Customer Address management forms)
     *
     * @return boolean
     */
    public function addressIsVatAttributeVisible()
    {
        return $this->helperAddress->isVatAttributeVisible();
    }

    /**
     * Retrieve regions data json
     *
     * @return string
     * @throws NoSuchEntityException
     */
    public function dataGetRegionJson()
    {
        return $this->helperData->getRegionJson();
    }

    /**
     * Return ISO2 country codes, which have optional Zip/Postal pre-configured
     *
     * @param bool $asJson
     * @return array|string
     */
    public function dataGetCountriesWithOptionalZip($asJson)
    {
        return $this->helperData->getCountriesWithOptionalZip($asJson);
    }
}