eee
This commit is contained in:
@@ -17,14 +17,13 @@ use Exception;
|
|||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
use ReturnTypeWillChange;
|
use ReturnTypeWillChange;
|
||||||
use Kiri\ToArray;
|
|
||||||
use Traversable;
|
use Traversable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AbstractCollection
|
* Class AbstractCollection
|
||||||
* @package Database\Base
|
* @package Database\Base
|
||||||
*/
|
*/
|
||||||
abstract class AbstractCollection extends Component implements \IteratorAggregate, \ArrayAccess, ToArray
|
abstract class AbstractCollection extends Component implements \IteratorAggregate, \ArrayAccess, \Arrayable
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-2
@@ -25,7 +25,6 @@ use Exception;
|
|||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
use ReturnTypeWillChange;
|
use ReturnTypeWillChange;
|
||||||
use Kiri\ToArray;
|
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use validator\Validator;
|
use validator\Validator;
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ use validator\Validator;
|
|||||||
* @property array $attributes
|
* @property array $attributes
|
||||||
* @property array $oldAttributes
|
* @property array $oldAttributes
|
||||||
*/
|
*/
|
||||||
abstract class Model extends Component implements ModelInterface, ArrayAccess, ToArray
|
abstract class Model extends Component implements ModelInterface, ArrayAccess, \Arrayable
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class Model extends Base\Model
|
|||||||
$with = $this->getWith();
|
$with = $this->getWith();
|
||||||
foreach ($with as $value) {
|
foreach ($with as $value) {
|
||||||
$join = $this->withRelate($value);
|
$join = $this->withRelate($value);
|
||||||
if ($join instanceof Kiri\ToArray) {
|
if ($join instanceof \Arrayable) {
|
||||||
$join = $join->toArray();
|
$join = $join->toArray();
|
||||||
}
|
}
|
||||||
$data[$value] = $join;
|
$data[$value] = $join;
|
||||||
|
|||||||
Reference in New Issue
Block a user