PluginProbe
Slider Ultimate / 2.0.7
Slider Ultimate v2.0.7
2.2.10 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 All 54 releases
ultimate-slider / views / Base.class.php

Base.class.php in Slider Ultimate 2.0.7, at views/Base.class.php

71 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Base class
5 *
6 * @since 2.0.0
7 */
8
9 // Load library classes
10 require_once( EWD_US_PLUGIN_DIR . '/views/View.class.php' );
11 require_once( EWD_US_PLUGIN_DIR . '/views/View.Slide.class.php' );
12 require_once( EWD_US_PLUGIN_DIR . '/views/View.Slide.UPCP.class.php' );
13 require_once( EWD_US_PLUGIN_DIR . '/views/View.Slide.URP.class.php' );
14 require_once( EWD_US_PLUGIN_DIR . '/views/View.Slide.WooCommerce.class.php' );
15 require_once( EWD_US_PLUGIN_DIR . '/views/View.Slider.class.php' );
16
17 class ewdusBase {
18
19 public $id = null;
20
21 // Collect errors during processing
22 public $errors = array();
23
24
25 /**
26 * Initialize the class
27 * @since 2.0.0
28 */
29 public function __construct( $args ) {
30
31 // Parse the values passed
32 $this->parse_args( $args );
33
34 }
35
36 /**
37 * Parse the arguments passed in the construction and assign them to
38 * internal variables.
39 * @since 2.0.0
40 */
41 public function parse_args( $args ) {
42 foreach ( $args as $key => $val ) {
43 switch ( $key ) {
44
45 case 'id' :
46 $this->{$key} = esc_attr( $val );
47
48 default :
49 $this->{$key} = $val;
50
51 }
52 }
53 }
54
55 /**
56 * Set an error
57 * @since 2.0.0
58 */
59 public function set_error( $error ) {
60 $this->errors[] = array_merge(
61 $error,
62 array(
63 'class' => get_class( $this ),
64 'id' => $this->id,
65 'backtrace' => debug_backtrace()
66 )
67 );
68 }
69
70 }
71