PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / trunk
Slider Ultimate vtrunk
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 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / views / Base.class.php
ultimate-slider / views Last commit date
Base.class.php 5 years ago View.Slide.UPCP.class.php 1 year ago View.Slide.URP.class.php 1 year ago View.Slide.WooCommerce.class.php 1 year ago View.Slide.class.php 1 year ago View.Slider.class.php 1 year ago View.class.php 1 year ago
Base.class.php
71 lines
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