original_string: public function getAttribute($name, $default = null)
      {
          if (in_array($name, $this->emulatedAttributes, true)) {
              return $this->{$name};
          }
          if (array_key_exists($name, $this->attributes)) {
              return $this->attributes[$name];
          }
  
          return $default;
      }
code: public function getAttribute($name, $default = null)
      {
          if (in_array($name, $this->emulatedAttributes, true)) {
              return $this->{$name};
          }
          if (array_key_exists($name, $this->attributes)) {
              return $this->attributes[$name];
          }
  
          return $default;
      }
code_tokens: public function getAttribute ( $ name , $ default = null ) { if ( in_array ( $ name , $ this -> emulatedAttributes , true ) ) { return $ this -> { $ name } ; } if ( array_key_exists ( $ name , $ this -> attributes ) ) { return $ this -> attributes [ $ name ] ; } return $ default ; }
docstring: Read an attribute from the request, or get the default
  
  @param string $name The attribute name.
  @param mixed|null $default The default value if the attribute has not been set.
  @return mixed
docstring_tokens: Read an attribute from the request or get the default