Passed
Push — master ( c0a3a7...3b84a4 )
by Jeroen
58:51
created

engine/classes/Elgg/Database/Seeds/Seed.php (1 issue)

1
<?php
2
3
namespace Elgg\Database\Seeds;
4
5
/**
6
 * Abstract seed
7
 *
8
 * Plugins should extend this class to create their own seeders,
9
 * add use 'seeds','database' plugin hook to add their seed to the sequence.
10
 */
11
abstract class Seed implements Seedable {
12
13
	use Seeding;
14
15
	/**
16
	 * Seed constructor.
17
	 *
18
	 * @param null $limit Number of item to seed
0 ignored issues
show
Documentation Bug introduced by Ismayil Khayredinov
Are you sure the doc-type for parameter $limit is correct as it would always require null to be passed?
Loading history...
19
	 */
20
	public function __construct($limit = null) {
21
		if (isset($limit)) {
22
			$this->limit = $limit;
23
		}
24
	}
25
26
	/**
27
	 * Populate database
28
	 * @return mixed
29
	 */
30
	abstract function seed();
31
32
	/**
33
	 * Removed seeded rows from database
34
	 * @return mixed
35
	 */
36
	abstract function unseed();
37
38
}
39