403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/onec/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/onec/documentimportfactory.php
<?php
namespace Bitrix\Sale\Exchange\OneC;

use Bitrix\Main;
use Bitrix\Sale\Exchange;


class DocumentImportFactory
{
    /** Create new document import by specified document type ID.
     * @static
     * @param int $documentTypeID Document type ID.
     * @return DocumentBase
     * @throws Main\ArgumentOutOfRangeException
     * @throws Main\NotSupportedException
     */
    public static function create($documentTypeID)
    {
        if(!is_int($documentTypeID))
        {
            $documentTypeID = (int)$documentTypeID;
        }

        if(!DocumentType::IsDefined($documentTypeID))
        {
            throw new Main\ArgumentOutOfRangeException('documentTypeID', DocumentType::FIRST, DocumentType::LAST);
        }

        if($documentTypeID === DocumentType::ORDER)
        {
            return new OrderDocument();
        }
        elseif($documentTypeID === DocumentType::SHIPMENT)
        {
            return new ShipmentDocument();
        }
        elseif($documentTypeID === DocumentType::PAYMENT_CASH)
        {
            return new PaymentCashDocument();
        }
        elseif($documentTypeID === DocumentType::PAYMENT_CASH_LESS)
        {
            return new PaymentCashLessDocument();
        }
        elseif($documentTypeID === DocumentType::PAYMENT_CARD_TRANSACTION)
        {
            return new PaymentCardDocument();
        }
        elseif($documentTypeID === DocumentType::PROFILE)
        {
            return new ProfileDocument();
        }
		elseif($documentTypeID === DocumentType::USER_PROFILE)
		{
			return new UserProfileDocument();
		}
        else
        {
            throw new Main\NotSupportedException("Document type: '".Exchange\EntityType::ResolveName($documentTypeID)."' is not supported in current context");
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit