Commits

lornajane committed 844228e

adding eightball example function to soap library

  • Participants
  • Parent commits 32fe824

Comments (0)

Files changed (1)

File public/soap/Library.php

 <?php
 
 class Library {
-    public function thinkOfANumber() {
-        return 42;
-    }
 
-    public function thinkOfAName() {
-        return 'Arthur Dent';
+    public function eightBall() {
+        $options = array(
+            "Without a doubt",
+            "As I see it, yes",
+            "Most likely",
+            "Reply hazy, try again",
+            "Better not tell you now",
+            "Concentrate and ask again",
+            "Don't count on it",
+            "Very doubtful");
+
+        return $options[array_rand($options)];
     }
 }