1 | <?php |
||
28 | abstract class WordPoints_Entity_Context { |
||
29 | |||
30 | /** |
||
31 | * The slug of this context. |
||
32 | * |
||
33 | * @since 1.0.0 |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $slug; |
||
38 | |||
39 | /** |
||
40 | * @since 1.0.0 |
||
41 | * |
||
42 | * @param string $slug The slug of this context. |
||
43 | */ |
||
44 | public function __construct( $slug ) { |
||
47 | |||
48 | /** |
||
49 | * Get the slug of this context. |
||
50 | * |
||
51 | * @since 1.0.0 |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function get_slug() { |
||
58 | |||
59 | /** |
||
60 | * Get the current ID of this context. |
||
61 | * |
||
62 | * @since 1.0.0 |
||
63 | * |
||
64 | * @return int|string|false The ID or slug of the context, or false if not |
||
65 | * currently in this context. |
||
66 | */ |
||
67 | abstract public function get_current_id(); |
||
68 | } |
||
69 | |||
71 |