Sleimanx2\Plastic\Mappings\Mappings::getRan PHP Méthode

getRan() public méthode

Get the ran mappings.
public getRan ( ) : array
Résultat array
    public function getRan()
    {
        $result = $this->table()->orderBy('batch', 'asc')->orderBy('mapping', 'asc')->pluck('mapping');
        if (is_array($result)) {
            return $result;
        }
        return $result->toArray();
    }

Usage Example

Exemple #1
0
 public function run($path, array $options = [])
 {
     $files = $this->getMappingFiles($path);
     $ran = $this->repository->getRan();
     $mappings = array_diff($files, $ran);
     $this->requireFiles($path, $mappings);
     $this->runMappingList($mappings, $options);
 }