1 | <?php |
||
8 | class PreparationMigrationDirectory |
||
9 | { |
||
10 | private $baseDirectory; |
||
11 | private $bundles; |
||
12 | |||
13 | /** |
||
14 | * Constructor |
||
15 | * |
||
16 | * @param string $baseDirectory Base directory for migrations. |
||
17 | * @param Symfony\Component\HttpKernel\Bundle\BundleInterface[] $bundles Array of BunleInterface instances. |
||
18 | */ |
||
19 | public function __construct($baseDirectory, $bundles) |
||
25 | |||
26 | /** |
||
27 | * Prepare migration directory to use. |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | public function prepare() |
||
50 | } |
||
51 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: