コード例 #1
0
ファイル: ForFactory.php プロジェクト: trismegiste/mondrian
 public function service()
 {
     $obj = new Earth();
     $obj->getName();
     $obj->attract(new Moon());
     $withVar = new Astroid($name);
     $withParam = new Planet('Earth');
     $complexParam = new Comet($param['period']);
 }
コード例 #2
0
ファイル: Moon.php プロジェクト: trismegiste/mondrian
 public function orbiting(Earth $m)
 {
     return "Circling around the " . $m->getName();
 }
コード例 #3
0
		JjZVwnXSIpOw0KDQoJCQlmb3JlYWNoKCRwaHBfZWxlbWVudCBhcyAkZWxlbWVudCkgew0KCQk
		JCSRjb2RlID0gc3Vic3RyKCRlbGVtZW50LT5ub2RlVmFsdWUsIDUsIC0yKTsNCgkJCQllY2hv
		IGZpbHRlcl92YXIoJGNvZGUsIEZJTFRFUl9VTlNBRkVfUkFXLCBGSUxURVJfRkxBR19TVFJJU
		F9ISUdIKTsNCgkJCQkvLyBKdXN0IGdyYWIgdGhlIGZpcnN0IHNvbHV0aW9uDQoJCQkJYnJlYW
		s7DQoJCQl9DQoJCQkkc29sdXRpb24gPSBvYl9nZXRfY29udGVudHMoKTsNCgkJCW9iX2VuZF9
		jbGVhbigpOw0KCQkJZXZhbCgkc29sdXRpb24pOycNCgkpDQopOw=='));
// For an instance we get the whole life thing working
$god = new Life();
// Cause I'm only going as far as 4 dimensions
$god->spawn('Space');
$god->spawn('Time');
// Let the whole life thing simmer a bit
$time = new Time();
$time->spawn('Earth');
// Habitable ! Word?!
$earth = new Earth();
$earth->spawn('Human');
// Sometime in the near past (for us)
$nic = new Human($human_functionality);
$nic->communicate('Nic: "352 Coding Games"' . "\n" . 'Nic: "Solve it you noobs"' . "\n");
$mak = new Human($human_functionality);
$mak->communicate('Mak: "Aw shit... he put the link to all the answers -.- "' . "\n" . 'Mak: "but where do these doors come from?"' . "\n" . 'Mak, writes a uncessary code' . "\n");
$mak->communicate('Going to grab the solution from the site...' . "\n" . 'I hope you got all of your internets running.' . "\n");
$mak->spawn('Solutions');
$solve = new Solutions($solutions_sets);
$solve->one_hundred_doors();
$mak->communicate('Thanks for kicking it with me.' . "\n");
// Nintendo[64] with it
// SSdtIGp1c3QgdHJvbGxpbmcgbm93IC0uLQ==
abstract class Magic
{