renamed the top level classes a bit
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Wed, 26 Oct 2011 00:15:59 +0200
changeset 5 879f0956be86
parent 4 9a001a04b634
child 6 48ffdc97f54b
renamed the top level classes a bit
addressbook.class.php
index.php
--- a/addressbook.class.php	Tue Oct 25 23:56:28 2011 +0200
+++ b/addressbook.class.php	Wed Oct 26 00:15:59 2011 +0200
@@ -1,11 +1,11 @@
 <?
-interface AdressBook_Interface {
+interface Address_Book {
     public function get_entries();
     public function search_entries($pattern);
     public function add_entry($entry);
 }
 
-class AddressBook implements AdressBook_Interface {
+class Address_Book_File implements Address_Book {
 
     const RS = "\n";
     const FS = "\t";
--- a/index.php	Tue Oct 25 23:56:28 2011 +0200
+++ b/index.php	Wed Oct 26 00:15:59 2011 +0200
@@ -6,9 +6,9 @@
 
 const FILE = "var/abook.txt";
 
-if ($_REQUEST) {
+if (isset($_REQUEST['action'])) {
     require 'addressbook.class.php';
-    $abook = new AddressBook(FILE);
+    $abook = new Address_Book_File(FILE);
 
     switch (@$_REQUEST['action']) {
 	    // Nach dem Eintragen bleiben wir auf der Eintragsseite,