本文整理汇总了PHP中jamesvweston\Utilities\ArrayUtil::isArrays方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::isArrays方法的具体用法?PHP ArrayUtil::isArrays怎么用?PHP ArrayUtil::isArrays使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jamesvweston\Utilities\ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::isArrays方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($data)
{
$data = AU::get($data['AddressValidateResponse']);
$addresses = AU::isArrays($data['Address']) ? $data['Address'] : [$data['Address']];
foreach ($addresses as $item) {
$this->addItem(new AddressVerifyResponseItem($item));
}
}
示例2: __construct
/**
* @param array $data
*/
public function __construct($data)
{
$data = AU::get($data['CityStateLookupResponse'], []);
$zipCodes = AU::get($data['ZipCode'], []);
$zipCodes = AU::isArrays($zipCodes) ? $zipCodes : [$zipCodes];
foreach ($zipCodes as $item) {
$this->items[] = new CityStateLookupResponseItem($item);
}
}
示例3: __construct
/**
* @param array $data
*/
public function __construct($data)
{
$data = AU::get($data['ZipCodeLookupResponse'], []);
$addresses = AU::get($data['Address'], []);
$addresses = AU::isArrays($addresses) ? $addresses : [$addresses];
foreach ($addresses as $item) {
$this->items[] = new ZipCodeLookupResponseItem($item);
}
}
示例4: __construct
/**
* @param array $data
*/
public function __construct($data = [])
{
$items = AU::get($data['items'], []);
$items = AU::isArrays($items) ? $items : [$items];
foreach ($items as $item) {
if ($item instanceof BaseAddressVerifyRequestItem) {
$this->addItem($item);
} else {
$this->addItem(new AddressVerifyRequestItem($item));
}
}
$this->includeOptionalElements = AU::get($data['includeOptionalElements']);
$this->returnCarrierRoute = AU::get($data['returnCarrierRoute']);
}
示例5: __construct
/**
* @param array|null $data
*/
public function __construct($data = null)
{
if (is_array($data)) {
$this->id = AU::get($data['id']);
if (!is_null(AU::get($data['vendor']))) {
$this->vendor = new Vendor(AU::get($data['vendor']));
}
$this->jobType = new JobType(AU::get($data['jobType']));
$this->jobStatus = new JobStatus(AU::get($data['jobStatus']));
$this->jobStatusHistory = [];
$jobStatusHistory = AU::get($data['jobStatusHistory']);
if (AU::isArrays($jobStatusHistory)) {
foreach ($jobStatusHistory as $item) {
$this->jobStatusHistory[] = new JobStatusHistory($item);
}
}
$this->jobItems = [];
$jobItems = AU::get($data['jobItems']);
if (AU::isArrays($jobItems)) {
foreach ($jobItems as $item) {
$this->jobItems[] = new JobItem($item);
}
}
$this->totalItems = AU::get($data['totalItems']);
$this->totalSuccessful = AU::get($data['totalSuccessful']);
$this->totalErrors = AU::get($data['totalErrors']);
$this->originalFileName = AU::get($data['originalFileName']);
$this->convertedFileName = AU::get($data['convertedFileName']);
$this->fileKey = AU::get($data['fileKey']);
$this->filePath = AU::get($data['filePath']);
if (!is_null(AU::get($data['createdBy']))) {
$this->createdBy = new User(AU::get($data['createdBy']));
}
if (!is_null(AU::get($data['createdAt']))) {
$this->createdAt = new DateTime(AU::get($data['createdAt']));
}
if (!is_null(AU::get($data['startedAt']))) {
$this->startedAt = new DateTime(AU::get($data['startedAt']));
}
if (!is_null(AU::get($data['finishedAt']))) {
$this->finishedAt = new DateTime(AU::get($data['finishedAt']));
}
}
}
示例6: __construct
/**
* @param array|null $data
*/
public function __construct($data = null)
{
if (is_array($data)) {
$this->id = AU::get($data['id']);
$this->vehicleModel = new VehicleModel(AU::get($data['vehicleModel']));
$this->vehicleType = new VehicleType(AU::get($data['vehicleType']));
$this->vehicleClass = new VehicleClass(AU::get($data['vehicleClass']));
$this->transmission = !is_null(AU::get($data['transmission'])) ? new Transmission(AU::get($data['transmission'])) : null;
$this->fuelType = !is_null(AU::get($data['fuelType'])) ? new FuelType(AU::get($data['fuelType'])) : null;
$this->defaultVehicleImage = !is_null(AU::get($data['defaultVehicleImage'])) ? new VehicleImage(AU::get($data['defaultVehicleImage'])) : null;
$this->vehicleImages = [];
if (!is_null(AU::isArrays($data['vehicleImages']))) {
foreach ($data['vehicleImages'] as $vehicleImage) {
$this->vehicleImages[] = new VehicleImage($vehicleImage);
}
}
$this->createdBy = new User(AU::get($data['createdBy']));
$this->yearCreated = AU::get($data['yearCreated']);
$this->feetLong = AU::get($data['feetLong']);
$this->uniqueReference = AU::get($data['uniqueReference']);
$this->statusId = AU::get($data['statusId']);
$this->createdAt = AU::get($data['createdAt']);
}
}