original_string: public function set_periodic_refresh_delay($delay = null) {
          if ($this->_state > self::STATE_BEFORE_HEADER) {
              throw new coding_exception('You cannot set a periodic refresh delay after the header has been printed');
          }
          if ($delay === null) {
              $this->_periodicrefreshdelay = null;
          } else if (is_int($delay)) {
              $this->_periodicrefreshdelay = $delay;
          }
      }
code: public function set_periodic_refresh_delay($delay = null) {
          if ($this->_state > self::STATE_BEFORE_HEADER) {
              throw new coding_exception('You cannot set a periodic refresh delay after the header has been printed');
          }
          if ($delay === null) {
              $this->_periodicrefreshdelay = null;
          } else if (is_int($delay)) {
              $this->_periodicrefreshdelay = $delay;
          }
      }
code_tokens: public function set_periodic_refresh_delay ( $ delay = null ) { if ( $ this -> _state > self :: STATE_BEFORE_HEADER ) { throw new coding_exception ( 'You cannot set a periodic refresh delay after the header has been printed' ) ; } if ( $ delay === null ) { $ this -> _periodicrefreshdelay = null ; } else if ( is_int ( $ delay ) ) { $ this -> _periodicrefreshdelay = $ delay ; } }
docstring: Sets the page to periodically refresh
  
  This function must be called before $OUTPUT->header has been called or
  a coding exception will be thrown.
  
  @param int $delay Sets the delay before refreshing the page, if set to null refresh is cancelled.
  @throws coding_exception
docstring_tokens: Sets the page to periodically refresh