1 | <?php |
||
5 | abstract class Seeder |
||
6 | { |
||
7 | /** |
||
8 | * Run the database seed logic. |
||
9 | */ |
||
10 | abstract public function run(); |
||
11 | |||
12 | /** |
||
13 | * Call the run method on the given seeder class. |
||
14 | * |
||
15 | * @param string $class |
||
16 | */ |
||
17 | protected function call($class) |
||
21 | |||
22 | public function setRunner(SeedRunner $runner) |
||
26 | } |
||
27 |
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: