|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/public_html/wp/wp-content/plugins/wp-smushit/core/parser/ | |
|
Path: //home2/gazetufm/public_html/wp/wp-content/plugins/wp-smushit/core/parser/class-value.php
Size: 816 B
Permissions: 0644
<?php
namespace Smush\Core\Parser;
class Value {
private $previous_value;
private $value;
private $has_updates = false;
public function __construct( $value ) {
$this->previous_value = '';
$this->value = $value;
}
/**
* @param $value
*
* @return bool
*/
public function set( $value ) {
if ( $value === $this->value ) {
/**
* Don't do anything if the value hasn't changed.
* We don't want to do unnecessary string replacements.
*/
return false;
}
$this->previous_value = $this->value;
$this->value = $value;
$this->has_updates = true;
return true;
}
public function get() {
return $this->value;
}
public function get_previous() {
return $this->previous_value;
}
public function has_updates() {
return $this->has_updates;
}
}