Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class Object extends SystemObject implements Object_Interface
- {
- const Blank = NULL;
- final public function copy() { $copy = $this->getTemp(); $copy->set($this->__buffer); return $copy; }
- final public function duplicate() { $copy = $this->getTemp(); $copy->set($this->__buffer)->setCopy($this->__copy); return $copy; }
- final public function get() { return $this->__copy; }
- final public function restore() { $this->setCopy($this->__buffer); return $this; }
- final public function registerMember(Hash $hash) { $this->__usedBy[] = $hash->getHashCode()->get(); }
- public function set($value) { try{ if(FALSE === $this->internalTypeIsModifiable()) return $this; $this->__buffer = $value; return $this->setCopy($this->__buffer); } catch(UnauthorizedAccessException $e){throw new ObjectHandlerWriteException(ObjectHandlerWriteException::ERROR_CAN_NOT_WRITE, $e);} }
- final public function apply() { try{ if($this->internalTypeIsModifiable()) return $this->set($this->__copy); } catch(UnauthorizedAccessException $e){throw new ObjectHandlerWriteException(ObjectHandlerWriteException::ERROR_CAN_NOT_WRITE, $e);} }
- public function __construct($value) { parent::__construct(); $this->set($value); }
- private $__copy = self::Blank;
- private $__buffer = self::Blank;
- private $__usedBy = array();
- final protected function getTemp() { $c = get_class($this); return new $c($this->get()); }
- final protected function setCopy($value) { $this->__copy = $value; return $this; }
- final protected function _compareTo(Object $object) { return new Boolean($this->get() === $object->get()); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement