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) |
||
47 | |||
48 | /** |
||
49 | * Get Seeder instance |
||
50 | * |
||
51 | * @param string $seeder |
||
52 | * @return Seeder |
||
53 | */ |
||
54 | protected function loadSeeder($seeder) |
||
61 | |||
62 | /** |
||
63 | * Call depend seeder list |
||
64 | * |
||
65 | * @param string $seedPath |
||
66 | */ |
||
67 | public function callDepends($seedPath) |
||
79 | |||
80 | /** |
||
81 | * Call depend seeder |
||
82 | * |
||
83 | * @param string|array $seederName |
||
84 | */ |
||
85 | protected function callDepend($seederName) |
||
99 | |||
100 | /** |
||
101 | * Set path for seeder files |
||
102 | * |
||
103 | * @param string $path |
||
104 | */ |
||
105 | public function setPath($path) |
||
109 | |||
110 | public function __get($property) |
||
114 | } |
||
115 |
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.