1 | <?php |
||
11 | class Seeder |
||
|
|||
12 | { |
||
13 | private $CI; |
||
14 | protected $db; |
||
15 | protected $dbforge; |
||
16 | protected $seedPath; |
||
17 | protected $depends = []; |
||
18 | |||
19 | public function __construct() |
||
27 | |||
28 | /** |
||
29 | * Run another seeder |
||
30 | * |
||
31 | * @param string $seeder Seeder classname |
||
32 | */ |
||
33 | public function call($seeder, $call_depends = true) |
||
46 | |||
47 | /** |
||
48 | * Get Seeder instance |
||
49 | * |
||
50 | * @param string $seeder |
||
51 | * @return Seeder |
||
52 | */ |
||
53 | protected function loadSeeder($seeder) |
||
60 | |||
61 | /** |
||
62 | * Call depend seeder list |
||
63 | * |
||
64 | * @param string $seedPath |
||
65 | */ |
||
66 | public function callDepends($seedPath) |
||
78 | |||
79 | /** |
||
80 | * Call depend seeder |
||
81 | * |
||
82 | * @param string|array $seederName |
||
83 | */ |
||
84 | protected function callDepend($seederName) |
||
98 | |||
99 | /** |
||
100 | * Set path for seeder files |
||
101 | * |
||
102 | * @param string $path |
||
103 | */ |
||
104 | public function setPath($path) |
||
108 | |||
109 | public function __get($property) |
||
113 | } |
||
114 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.