src/Porter.php
public function import(ImportSpecification $specification)
    {
        $specification = clone $specification;

        $records = $this->fetch(
            $specification->getResource(),
            $specification->getProviderName(),
            ConnectionContextFactory::create($specification)
        );

        if (!$records instanceof ProviderRecords) {
            $records = $this->createProviderRecords($records, $specification->getResource());
        }

        $records = $this->transformRecords($records, $specification->getTransformers(), $specification->getContext());

        return $this->createPorterRecords($records, $specification);
    }
public function import(ImportSpecification $specification)
    {
        $specification = clone $specification;

        $records = $this->fetch(
            $specification->getResource(),
            $specification->getProviderName(),
            ConnectionContextFactory::create($specification)
        );

        if (!$records instanceof ProviderRecords) {
            $records = $this->createProviderRecords($records, $specification->getResource());
        }

        $records = $this->transformRecords($records, $specification->getTransformers(), $specification->getContext());

        return $this->createPorterRecords($records, $specification);
    }
public function import ( ImportSpecification $ specification ) { $ specification = clone $ specification ; $ records = $ this -> fetch ( $ specification -> getResource ( ) , $ specification -> getProviderName ( ) , ConnectionContextFactory :: create ( $ specification ) ) ; if ( ! $ records instanceof ProviderRecords ) { $ records = $ this -> createProviderRecords ( $ records , $ specification -> getResource ( ) ) ; } $ records = $ this -> transformRecords ( $ records , $ specification -> getTransformers ( ) , $ specification -> getContext ( ) ) ; return $ this -> createPorterRecords ( $ records , $ specification ) ; }
Imports data according to the design of the specified import specification.

@param ImportSpecification $specification Import specification.

@return PorterRecords|CountablePorterRecords

@throws ImportException Provider failed to return an iterator.
Imports data according to the design of the specified import specification .