src/Utility/LinkScanner.php
public static function import($filename)
    {
        try {
            $filename = Folder::isAbsolute($filename) ? $filename : Folder::slashTerm(self::getConfig('target')) . $filename;
            $instance = unserialize(file_get_contents($filename));
        } catch (Exception $e) {
            $message = preg_replace('/^file_get_contents\([\/\w\d:\-\\\\]+\): /', null, $e->getMessage());
            throw new RuntimeException(__d('link-scanner', 'Failed to import results from file `{0}` with message `{1}`', $filename, $message));
        }

        $instance->dispatchEvent('LinkScanner.resultsImported', [$filename]);

        return $instance;
    }
public static function import($filename)
    {
        try {
            $filename = Folder::isAbsolute($filename) ? $filename : Folder::slashTerm(self::getConfig('target')) . $filename;
            $instance = unserialize(file_get_contents($filename));
        } catch (Exception $e) {
            $message = preg_replace('/^file_get_contents\([\/\w\d:\-\\\\]+\): /', null, $e->getMessage());
            throw new RuntimeException(__d('link-scanner', 'Failed to import results from file `{0}` with message `{1}`', $filename, $message));
        }

        $instance->dispatchEvent('LinkScanner.resultsImported', [$filename]);

        return $instance;
    }
public static function import ( $ filename ) { try { $ filename = Folder :: isAbsolute ( $ filename ) ? $ filename : Folder :: slashTerm ( self :: getConfig ( 'target' ) ) . $ filename ; $ instance = unserialize ( file_get_contents ( $ filename ) ) ; } catch ( Exception $ e ) { $ message = preg_replace ( '/^file_get_contents\([\/\w\d:\-\\\\]+\): /' , null , $ e -> getMessage ( ) ) ; throw new RuntimeException ( __d ( 'link-scanner' , 'Failed to import results from file `{0}` with message `{1}`' , $ filename , $ message ) ) ; } $ instance -> dispatchEvent ( 'LinkScanner.resultsImported' , [ $ filename ] ) ; return $ instance ; }
Imports scan results.

You can indicate a relative or absolute path.
### Events
This method will trigger some events:
- `LinkScanner.resultsImported`: will be triggered when the results have
been exported.
@param string $filename Filename from which to import
@return \LinkScanner\Utility\LinkScanner
@see unserialize()
@throws RuntimeException
Imports scan results .