下面是 MapperInterface.php
我想弄清楚如何将 if-else 语句添加到 const 中。映射数组。像这样:
if (LIN02 == “VN”)
o Treat LIN03 as the SKU
· else if (LIN04 == “VN”)
o Treat LIN05 as the SKU
Run Code Online (Sandbox Code Playgroud)
<?php
declare(strict_types=1);
namespace Direct\OrderUpdate\Api;
use Direct\OrderUpdate\Api\OrderUpdateInterface;
/**
* Interface MapperInterface
* Translates parsed edi file data to a \Direct\OrderUpdate\Api\OrderUpdateInterface
* @package Direct\OrderUpdate\Api
*/
interface MapperInterface
{
/**
* Mapping array formatted as MAPPING[segemntId][elemntId] => methodNameToProcessTheValueOfElement
* @var array
*/
const MAPPING = [
'DTM' => ['DTM02' => 'processCreatedAt'], // shipment.created_at
'PRF' …Run Code Online (Sandbox Code Playgroud) 这是一个非常烦人的错误,似乎有关于此控制台错误的各种问题.在使用chrome的控制台中,它并没有给我很多帮助.
/**
* Dropdown menu positioning
*/
loc.dropMenuPositioning = function (){
var dropMenu = $('.js-dropdown-item-wrap');
var mainNavigationOffset = $('.js-nav-container > ul').offset();
var mainNavigationPosition = mainNavigationOffset.left;
dropMenu.css({'left' : mainNavigationPosition - 60});
};
Run Code Online (Sandbox Code Playgroud)
对不起,我在这个问题上没有更多的内容.任何帮助将不胜感激.谢谢.
之间有什么区别
<?xml version="1.0"?>
Run Code Online (Sandbox Code Playgroud)
和
<xml version="1.0">
Run Code Online (Sandbox Code Playgroud)
为什么在XML标签中看起来像速记PHP?我确定就是这样,但是为什么会在那呢?
我有一个引发错误的XML文件,但是我找不到错误,现在我假设它?是XML标记中的?
php ×2
arrays ×1
console.log ×1
constants ×1
css ×1
javascript ×1
jquery ×1
mapping ×1
xml ×1
xml-parsing ×1