示例#1
0
 public function listPipes()
 {
     return Strings::from(scandir($this->pipesDir))->diff(['.', '..'])->filter(function ($name) {
         $extensions = ['yml'];
         if ($this->allowPhp) {
             $extensions[] = 'php';
         }
         return preg_match('~\\.(' . implode('|', $extensions) . ')$~', $name);
     })->replace('.yml', '')->replace('.php', '')->values();
 }
示例#2
0
 /**
  * Converts collection to `Strings`.
  * Can be used to clone collection.
  * @return Strings
  */
 public function asStrings()
 {
     return Strings::from($this->value);
 }