public function FeedImportVectorReader::formatPath in Feed Import 7.3
Override this to preprocess your paths before they are used in map().
Parameters
string $path Path to format:
Return value
mixed Formatted path
Overrides FeedImportReader::formatPath
1 call to FeedImportVectorReader::formatPath()
- JSONFIReader::init in feed_import_base/
inc/ feed_import_readers.inc - Here you'll init your reader.
File
- feed_import_base/
inc/ feed_import_abstract.inc, line 289 - This file contains abstract classes and interfaces for feed import.
Class
- FeedImportVectorReader
- This class is a helper for vector (n dimensions) reader. Path format is like a/b/c which results in [a, b, c] array.
Code
public function formatPath($path) {
$path = preg_split('/(\\s?\\|\\s?)/', $path, -1, PREG_SPLIT_NO_EMPTY);
foreach ($path as &$p) {
$p = explode('/', $p);
}
return $path;
}