original_string: public function timestamp(DateTime $ts = null, $refreshTimestamp = false)
      {
          if ($ts) {
              if ($this->_config['refreshTimestamp']) {
                  $this->_config['refreshTimestamp'] = false;
              }
              $this->_ts = new Time($ts);
          } elseif ($this->_ts === null || $refreshTimestamp) {
              $this->_ts = new Time();
          }
  
          return $this->_ts;
      }
code: public function timestamp(DateTime $ts = null, $refreshTimestamp = false)
      {
          if ($ts) {
              if ($this->_config['refreshTimestamp']) {
                  $this->_config['refreshTimestamp'] = false;
              }
              $this->_ts = new Time($ts);
          } elseif ($this->_ts === null || $refreshTimestamp) {
              $this->_ts = new Time();
          }
  
          return $this->_ts;
      }
code_tokens: public function timestamp ( DateTime $ ts = null , $ refreshTimestamp = false ) { if ( $ ts ) { if ( $ this -> _config [ 'refreshTimestamp' ] ) { $ this -> _config [ 'refreshTimestamp' ] = false ; } $ this -> _ts = new Time ( $ ts ) ; } elseif ( $ this -> _ts === null || $ refreshTimestamp ) { $ this -> _ts = new Time ( ) ; } return $ this -> _ts ; }
docstring: Get or set the timestamp to be used
  
  Set the timestamp to the given DateTime object, or if not passed a new DateTime object
  If an explicit date time is passed, the config option `refreshTimestamp` is
  automatically set to false.
  
  @param \DateTime|null $ts Timestamp
  @param bool $refreshTimestamp If true timestamp is refreshed.
  @return \Cake\I18n\Time
docstring_tokens: Get or set the timestamp to be used