445052cc80bb33a176622e8baa6b4ad7a00bd3e6
[yaffs-website] / vendor / drupal / console-core / src / Utils / FileQueue.php
1 <?php
2
3 /**
4  * @file
5  * Contains Drupal\Console\Core\Utils\ChainQueue.
6  */
7
8 namespace Drupal\Console\Core\Utils;
9
10 /**
11  * Class FileQueue
12  *
13  * @package Drupal\Console\Core\Utils
14  */
15 class FileQueue
16 {
17     /**
18      * @var $commands array
19      */
20     private $files;
21
22     /**
23      * @var string
24      */
25     protected $appRoot;
26
27     /**
28      * FileQueue constructor.
29      *
30      * @param string $appRoot
31      */
32     public function __construct($appRoot)
33     {
34         $this->appRoot = $appRoot;
35     }
36
37     /**
38      * @param $file string
39      */
40     public function addFile($file)
41     {
42         $file = str_replace($this->appRoot, '', $file);
43         $this->files[] = $file;
44     }
45
46     /**
47      * @return array
48      */
49     public function getFiles()
50     {
51         return $this->files;
52     }
53 }