Skip to content

Instantly share code, notes, and snippets.

@TPei
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TPei/7f3731c72ea2588c5dd0 to your computer and use it in GitHub Desktop.
Save TPei/7f3731c72ea2588c5dd0 to your computer and use it in GitHub Desktop.
Proposed extesions to the typo3 documentation
PHP Code::
class Ship {
public $name;
public $coaches;
public $engineStatus;
public $speed;
function __construct($name, $coaches) {
$this->name = $name;
$this->coaches = $coaches;
}
...
}
$ship = new Ship('Fidelio', '100');
This will automatically set the name and number of coaches of the newly created ship. This is useful since these are things that are usually known when a ship is built.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment