1 | <?php |
||
15 | class MslsMain { |
||
16 | |||
17 | /** |
||
18 | * Instance of options |
||
19 | * |
||
20 | * @var MslsOptions |
||
21 | */ |
||
22 | protected $options; |
||
23 | |||
24 | /** |
||
25 | * Collection of blog objects |
||
26 | * |
||
27 | * @var MslsBlogCollection |
||
28 | */ |
||
29 | protected $collection; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param MslsOptions $options |
||
35 | * @param MslsBlogCollection $collection |
||
36 | */ |
||
37 | public function __construct( MslsOptions $options, MslsBlogCollection $collection ) { |
||
41 | |||
42 | /** |
||
43 | * Factory |
||
44 | * |
||
45 | * @codeCoverageIgnore |
||
46 | * |
||
47 | * @return static |
||
48 | */ |
||
49 | public static function init() { |
||
55 | |||
56 | /** |
||
57 | * Prints a message in the error log if WP_DEBUG is true |
||
58 | * |
||
59 | * @param mixed $message |
||
60 | */ |
||
61 | public function debugger( $message ) { |
||
69 | |||
70 | /** |
||
71 | * Get the input array |
||
72 | * |
||
73 | * @param int $object_id |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | public function get_input_array( $object_id ) { |
||
99 | |||
100 | /** |
||
101 | * Prepare input key/value-pair |
||
102 | * @param $key |
||
103 | * @param $value |
||
104 | * |
||
105 | * @return array |
||
106 | */ |
||
107 | protected function get_input_value( $key, $value ) { |
||
114 | |||
115 | /** |
||
116 | * Checks if the current input comes from the autosave-functionality |
||
117 | * |
||
118 | * @param int $post_id |
||
119 | * |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function is_autosave( $post_id ) { |
||
125 | |||
126 | /** |
||
127 | * Checks for the nonce in the INPUT_POST |
||
128 | * @return boolean |
||
129 | */ |
||
130 | public function verify_nonce() { |
||
136 | |||
137 | /** |
||
138 | * Delete |
||
139 | * |
||
140 | * @param int $object_id |
||
141 | * |
||
142 | * @codeCoverageIgnore |
||
143 | */ |
||
144 | public function delete( $object_id ) { |
||
147 | |||
148 | /** |
||
149 | * Save |
||
150 | * |
||
151 | * @param int $object_id |
||
152 | * @param string $class |
||
153 | * |
||
154 | * @codeCoverageIgnore |
||
155 | */ |
||
156 | protected function save( $object_id, $class ) { |
||
204 | |||
205 | } |
||
206 |