current_data = $meta;
$this->apply_changes();
}
/**
* When converted to JSON.
*
* @return object
*/
public function jsonSerialize() {
return $this->get_data();
}
/**
* Merge changes with data and clear.
*/
public function apply_changes() {
$this->data = $this->current_data;
}
/**
* Creates or updates a property in the metadata object.
*
* @param string $key Key to set.
* @param mixed $value Value to set.
*/
public function __set( $key, $value ) {
$this->current_data[ $key ] = $value;
}
/**
* Checks if a given key exists in our data. This is called internally
* by `empty` and `isset`.
*
* @param string $key Key to check if set.
*/
public function __isset( $key ) {
return array_key_exists( $key, $this->current_data );
}
/**
* Returns the value of any property.
*
* @param string $key Key to get.
* @return mixed Property value or NULL if it does not exists
*/
public function __get( $key ) {
if ( array_key_exists( $key, $this->current_data ) ) {
return $this->current_data[ $key ];
}
return null;
}
/**
* Return data changes only.
*
* @return array
*/
public function get_changes() {
$changes = array();
foreach ( $this->current_data as $id => $value ) {
if ( ! array_key_exists( $id, $this->data ) || $value !== $this->data[ $id ] ) {
$changes[ $id ] = $value;
}
}
return $changes;
}
/**
* Return all data as an array.
*
* @return array
*/
public function get_data() {
return $this->data;
}
}
Kaos Promosi 24 Jam
Kami bergerak dalam bidang Sablon kaos spanduk umbul bendera Partai, Kaos Partai Murah, Spanduk, Umbul Umbul, Stiker Digital Print serta Stokis Grosir Kaos Polos Terbaik Langsung dari Pabrik.
Kami memberikan harga lebih murah untuk meringankan budget Anda dengan harapan supaya kami dapat terus bekerja sama dengan Anda dalam proyek jangka panjang.
Kualitas Terjamin
Didukung oleh tenaga jahit, sablon dan bordir kaos yang profesional dan berpengalaman. Kami siap penuhi kebutuhan promosi dan mewujudkan keinginan Anda.
Produksi Tercepat
Dengan hanya membutuhkan waktu tiga hari kerja untuk proses produksi, kaos impian Anda dan team dapat segera terwujud sesuai dengan keinginan Anda.