private function findSourcesInPattern(string $pattern): array
  {
    $sources = [];

    $directory = new RecursiveDirectoryIterator(self::getLeadingDir($pattern));
    $directory->setFlags(RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
    $files = new RecursiveIteratorIterator($directory);
    foreach ($files as $fullPath => $file)
    {
      // If the file is a source file with stored routine add it to my sources.
      if ($file->isFile() && SelectorHelper::matchPath($pattern, $fullPath))
      {
        $sources[] = $fullPath;
      }
    }

    return $sources;
  }
private function findSourcesInPattern(string $pattern): array
  {
    $sources = [];

    $directory = new RecursiveDirectoryIterator(self::getLeadingDir($pattern));
    $directory->setFlags(RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
    $files = new RecursiveIteratorIterator($directory);
    foreach ($files as $fullPath => $file)
    {
      // If the file is a source file with stored routine add it to my sources.
      if ($file->isFile() && SelectorHelper::matchPath($pattern, $fullPath))
      {
        $sources[] = $fullPath;
      }
    }

    return $sources;
  }
private function findSourcesInPattern ( string $ pattern ) : array { $ sources = [ ] ; $ directory = new RecursiveDirectoryIterator ( self :: getLeadingDir ( $ pattern ) ) ; $ directory -> setFlags ( RecursiveDirectoryIterator :: FOLLOW_SYMLINKS ) ; $ files = new RecursiveIteratorIterator ( $ directory ) ; foreach ( $ files as $ fullPath => $ file ) { // If the file is a source file with stored routine add it to my sources. if ( $ file -> isFile ( ) && SelectorHelper :: matchPath ( $ pattern , $ fullPath ) ) { $ sources [ ] = $ fullPath ; } } return $ sources ; }
Finds sources of stored routines in a pattern.

@param string $pattern The pattern of the sources.

@return string[]
Finds sources of stored routines in a pattern .