parse_args( $args ); } /** * Parse the arguments passed in the construction and assign them to * internal variables. * @since 2.0.0 */ public function parse_args( $args ) { foreach ( $args as $key => $val ) { switch ( $key ) { case 'id' : $this->{$key} = esc_attr( $val ); default : $this->{$key} = $val; } } } /** * Set an error * @since 2.0.0 */ public function set_error( $error ) { $this->errors[] = array_merge( $error, array( 'class' => get_class( $this ), 'id' => $this->id, 'backtrace' => debug_backtrace() ) ); } }