protected function getKeysForSource(int $sourceId): \Traversable
    {
        $row = $this->getRow($sourceId);
        foreach ($this->extractors as $extractor) {
            switch (true) {
                case $extractor instanceof MultiStringExtractorInterface:
                    foreach ($extractor->keys($row) as $key) {
                        yield $extractor->name() . '.' . $key;
                    }
                    break;
                case $extractor instanceof ExtractorInterface:
                    if ($extractor->supports($row)) {
                        yield $extractor->name();
                    }
                    break;
                default:
                    throw new \InvalidArgumentException('Unknown extractor type ' . \get_class($extractor));
            }
        }
    }
protected function getKeysForSource(int $sourceId): \Traversable
    {
        $row = $this->getRow($sourceId);
        foreach ($this->extractors as $extractor) {
            switch (true) {
                case $extractor instanceof MultiStringExtractorInterface:
                    foreach ($extractor->keys($row) as $key) {
                        yield $extractor->name() . '.' . $key;
                    }
                    break;
                case $extractor instanceof ExtractorInterface:
                    if ($extractor->supports($row)) {
                        yield $extractor->name();
                    }
                    break;
                default:
                    throw new \InvalidArgumentException('Unknown extractor type ' . \get_class($extractor));
            }
        }
    }
protected function getKeysForSource ( int $ sourceId ) : \ Traversable { $ row = $ this -> getRow ( $ sourceId ) ; foreach ( $ this -> extractors as $ extractor ) { switch ( true ) { case $ extractor instanceof MultiStringExtractorInterface : foreach ( $ extractor -> keys ( $ row ) as $ key ) { yield $ extractor -> name ( ) . '.' . $ key ; } break ; case $ extractor instanceof ExtractorInterface : if ( $ extractor -> supports ( $ row ) ) { yield $ extractor -> name ( ) ; } break ; default : throw new \ InvalidArgumentException ( 'Unknown extractor type ' . \ get_class ( $ extractor ) ) ; } } }
Get the keys for the source id.

@param int $sourceId The source id.

@return \Traversable|string[]

@throws \InvalidArgumentException When the extractor is unknown.
Get the keys for the source id .