<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Repository; class EmptyItem extends \stdClass { private $attributes = array(); public function __construct($C_lIX = array()) { $this->attributes = array_merge($this->attributes, $C_lIX); } public function __get($TUuqF) { return isset($this->attributes[$TUuqF]) ? $this->attributes[$TUuqF] : null; } public function __set($TUuqF, $tzAUI) { $this->attributes[$TUuqF] = $tzAUI; } } class RepositoryUtil { public static function itemsFromArray(array $YPAh8) { return collect($YPAh8)->map(function ($bPX0o) { return (object) $bPX0o; }); } public static function itemFromArray($Nrp0b) { return (object) $Nrp0b; } public static function makeItem($C_lIX = array()) { return new EmptyItem($C_lIX); } public static function makeItems($WbxhJ) { if ($WbxhJ instanceof \Illuminate\Support\Collection) { return $WbxhJ; } return collect(array($WbxhJ)); } }