protected function hydrateBulkRequest() {
        $class = new \ReflectionClass($this->getModelNamespace());
        $this->list = [];
        foreach($this->data as $item) {
            if(is_array($item)) {
                if(count($this->list) < Config::getParam('api.block.limit', 1000)) {
                    /** @var ActiveRecordInterface $model */
                    $model = $class->newInstance();
                    $this->hydrateModelFromRequest($model, $item);
                    $this->list[] = $model;
                } else {
                    Logger::log(t('Max items per bulk insert raised'), LOG_WARNING, count($this->data) . t('items'));
                }
            }
        }
    }
protected function hydrateBulkRequest() {
        $class = new \ReflectionClass($this->getModelNamespace());
        $this->list = [];
        foreach($this->data as $item) {
            if(is_array($item)) {
                if(count($this->list) < Config::getParam('api.block.limit', 1000)) {
                    /** @var ActiveRecordInterface $model */
                    $model = $class->newInstance();
                    $this->hydrateModelFromRequest($model, $item);
                    $this->list[] = $model;
                } else {
                    Logger::log(t('Max items per bulk insert raised'), LOG_WARNING, count($this->data) . t('items'));
                }
            }
        }
    }
protected function hydrateBulkRequest ( ) { $ class = new \ ReflectionClass ( $ this -> getModelNamespace ( ) ) ; $ this -> list = [ ] ; foreach ( $ this -> data as $ item ) { if ( is_array ( $ item ) ) { if ( count ( $ this -> list ) < Config :: getParam ( 'api.block.limit' , 1000 ) ) { /** @var ActiveRecordInterface $model */ $ model = $ class -> newInstance ( ) ; $ this -> hydrateModelFromRequest ( $ model , $ item ) ; $ this -> list [ ] = $ model ; } else { Logger :: log ( t ( 'Max items per bulk insert raised' ) , LOG_WARNING , count ( $ this -> data ) . t ( 'items' ) ) ; } } } }
Hydrate list elements for bulk insert
Hydrate list elements for bulk insert