original_string: public function extension($var = null)
      {
          if ($var !== null) {
              $this->extension = $var;
          }
          if (empty($this->extension)) {
              $this->extension = '.' . pathinfo($this->name(), PATHINFO_EXTENSION);
          }
  
          return $this->extension;
      }
code: public function extension($var = null)
      {
          if ($var !== null) {
              $this->extension = $var;
          }
          if (empty($this->extension)) {
              $this->extension = '.' . pathinfo($this->name(), PATHINFO_EXTENSION);
          }
  
          return $this->extension;
      }
code_tokens: public function extension ( $ var = null ) { if ( $ var !== null ) { $ this -> extension = $ var ; } if ( empty ( $ this -> extension ) ) { $ this -> extension = '.' . pathinfo ( $ this -> name ( ) , PATHINFO_EXTENSION ) ; } return $ this -> extension ; }
docstring: Gets and sets the extension field.
  
  @param null $var
  
  @return null|string
docstring_tokens: Gets and sets the extension field .