PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / Framework / Migrations / Contracts / BaseMigration.php

BaseMigration.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/Framework/Migrations/Contracts/BaseMigration.php

62 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Framework\Migrations\Contracts;
4
5 use Give\Framework\Exceptions\Primitives\RuntimeException;
6
7 /**
8 * Base Migration class
9 *
10 * @since 4.0.0
11 */
12 abstract class BaseMigration
13 {
14 /**
15 * Return a unique identifier for the migration
16 *
17 * @return string
18 */
19 public static function id()
20 {
21 throw new RuntimeException('A unique ID must be provided for the migration');
22 }
23
24 /**
25 * Return a Unix Timestamp for when the migration was created
26 *
27 * Example: strtotime( '2020-09-16 12:30:00')
28 *
29 * @since 2.9.0
30 *
31 * @return int Unix timestamp for when the migration was created
32 */
33 public static function timestamp()
34 {
35 throw new RuntimeException('This method must be overridden to return a valid unix timestamp');
36 }
37
38 /**
39 * Return migration title
40 *
41 * @since 2.10.0
42 *
43 * @return string
44 */
45 public static function title()
46 {
47 return static::id();
48 }
49
50 /**
51 * Return migration source
52 *
53 * @since 2.10.0
54 *
55 * @return string
56 */
57 public static function source()
58 {
59 return esc_html__('GiveWP Core', 'give');
60 }
61 }
62