Initiale Version

This commit is contained in:
Jan Unger
2016-08-16 21:20:53 +02:00
commit 88cf71d772
10930 changed files with 1708903 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<?php
spl_autoload_register(function ($klassenname) {
require __DIR__ . '/src/' . $klassenname . '.php';
});

View File

@@ -0,0 +1,8 @@
<?php
require __DIR__ . '/autoload.php';
$motor = new Motor();
$auto = new Auto($motor);
$auto->starte();

View File

@@ -0,0 +1,24 @@
<?php
class Auto
{
/**
* @var Motor
*/
private $motor;
public function __construct(Motor $motor)
{
$this->motor = $motor;
}
public function starte()
{
$this->motor->betaetigeAnlasser();
}
public function fahre($anzahlKilometer, $geschwindigkeit)
{
// ...
}
}

View File

@@ -0,0 +1,9 @@
<?php
class Motor
{
public function betaetigeAnlasser()
{
// ...
}
}