Contao\Model\Collection::__construct PHP Метод

__construct() публичный Метод

Create a new collection
public __construct ( array $arrModels, string $strTable )
$arrModels array An array of models
$strTable string The table name
    public function __construct(array $arrModels, $strTable)
    {
        $arrModels = array_values($arrModels);
        foreach ($arrModels as $objModel) {
            if (!$objModel instanceof Model) {
                throw new \InvalidArgumentException('Invalid type: ' . gettype($objModel));
            }
        }
        $this->arrModels = $arrModels;
        $this->strTable = $strTable;
    }