Scalr\Model\Collections\EntityIterator::__construct PHP Method

__construct() public method

Constructor
public __construct ( string $entityClass, ADORecordSet_mysqli $recordSet )
$entityClass string The name of the class of the Entity in the collection
$recordSet ADORecordSet_mysqli Result record set
    public function __construct($entityClass, $recordSet)
    {
        $this->entityClass = $entityClass;
        if (!$recordSet instanceof \ADORecordSet_mysqli) {
            throw new \InvalidArgumentException(sprintf("Argument must be instance of ADORecordSet class"));
        }
        $this->recordSet = $recordSet;
        parent::__construct($recordSet->getIterator());
    }