改名
This commit is contained in:
@@ -5,6 +5,8 @@ namespace Database\Base;
|
||||
|
||||
|
||||
use Database\ActiveRecord;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,9 +20,20 @@ class CollectionIterator extends \ArrayIterator
|
||||
private $model;
|
||||
|
||||
|
||||
/**
|
||||
* CollectionIterator constructor.
|
||||
* @param $model
|
||||
* @param array $array
|
||||
* @param int $flags
|
||||
* @throws \ReflectionException
|
||||
* @throws NotFindClassException
|
||||
*/
|
||||
public function __construct($model, $array = array(), $flags = 0)
|
||||
{
|
||||
$this->model = $model;
|
||||
if (is_string($model)) {
|
||||
$this->model = Snowflake::createObject($model);
|
||||
}
|
||||
parent::__construct($array, $flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user