src/AirtableClient.php
/**
     * Turns an array of arrays to an array of AirtableRecord objects.
     *
     * @param array  $records   An array of arrays
     * @param string $dataClass Optionnal class name which will hold record's fields
     *
     * @return array An array of AirtableRecords objects
     */
Turns an array of arrays to an array of AirtableRecord objects.
@param array  $records   An array of arrays
@param string $dataClass Optionnal class name which will hold record's fields

@return array An array of AirtableRecords objects
Turns an array of arrays to an array of AirtableRecord objects . @param array $records An array of arrays @param string $dataClass Optionnal class name which will hold record ' s fields @return array An array of AirtableRecords objects
private function mapRecordsToAirtableRecords(array $records, string $dataClass = null): array
    {
        return array_map(
            function (array $recordData) use ($dataClass): AirtableRecord {
                if (null !== $dataClass) {
                    $recordData = $this->createRecordFromResponse($dataClass, $recordData);
                }
                return AirtableRecord::createFromRecord($recordData);
            },
            $records
        );
    }
private function mapRecordsToAirtableRecords ( array $ records , string $ dataClass = null ) : array { return array_map ( function ( array $ recordData ) use ( $ dataClass ) : AirtableRecord { if ( null !== $ dataClass ) { $ recordData = $ this -> createRecordFromResponse ( $ dataClass , $ recordData ) ; } return AirtableRecord :: createFromRecord ( $ recordData ) ; } , $ records ) ; }
Turns an array of arrays to an array of AirtableRecord objects.
Turns an array of arrays to an array of AirtableRecord objects .