original_string: function restore($state=1) {
  		$fw=Base::instance();
  		if ($this->flag && is_file($file=($path=$fw->get('TEMP').
  			$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
  			$fw->hash($this->file).'-').$state.'.png')) {
  			if (is_resource($this->data))
  				imagedestroy($this->data);
  			$this->data=imagecreatefromstring($fw->read($file));
  			imagesavealpha($this->data,TRUE);
  			foreach (glob($path.'*.png',GLOB_NOSORT) as $match)
  				if (preg_match('/-(\d+)\.png/',$match,$parts) &&
  					$parts[1]>$state)
  					@unlink($match);
  			$this->count=$state;
  		}
  		return $this;
  	}
code: function restore($state=1) {
  		$fw=Base::instance();
  		if ($this->flag && is_file($file=($path=$fw->get('TEMP').
  			$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
  			$fw->hash($this->file).'-').$state.'.png')) {
  			if (is_resource($this->data))
  				imagedestroy($this->data);
  			$this->data=imagecreatefromstring($fw->read($file));
  			imagesavealpha($this->data,TRUE);
  			foreach (glob($path.'*.png',GLOB_NOSORT) as $match)
  				if (preg_match('/-(\d+)\.png/',$match,$parts) &&
  					$parts[1]>$state)
  					@unlink($match);
  			$this->count=$state;
  		}
  		return $this;
  	}
code_tokens: function restore ( $ state = 1 ) { $ fw = Base :: instance ( ) ; if ( $ this -> flag && is_file ( $ file = ( $ path = $ fw -> get ( 'TEMP' ) . $ fw -> hash ( $ fw -> get ( 'ROOT' ) . $ fw -> get ( 'BASE' ) ) . '.' . $ fw -> hash ( $ this -> file ) . '-' ) . $ state . '.png' ) ) { if ( is_resource ( $ this -> data ) ) imagedestroy ( $ this -> data ) ; $ this -> data = imagecreatefromstring ( $ fw -> read ( $ file ) ) ; imagesavealpha ( $ this -> data , TRUE ) ; foreach ( glob ( $ path . '*.png' , GLOB_NOSORT ) as $ match ) if ( preg_match ( '/-(\d+)\.png/' , $ match , $ parts ) && $ parts [ 1 ] > $ state ) @ unlink ( $ match ) ; $ this -> count = $ state ; } return $ this ; }
docstring: Revert to specified state
  @return object
  @param $state int
docstring_tokens: Revert to specified state