/** * Returns a bunch of raw data about the word. * * EG: * [base_path]/frontend_dev.php/words/wordnik?word=computer * * @param sfWebRequest $request */ public function executeWordnik(sfWebRequest $request) { $dictionary = new Wordnik(); // NOTE -- changed this from `getGetParameter` to `getParameter.` // The former wasn't working for some reason, $word was coming up empty // andyinabox - 2010-05-20 $word = $request->getParameter('word'); $this->definitions = $dictionary->getRawDefinitions($word, true); $this->related = $dictionary->getRawRelatedWords($word); $this->examples = $dictionary->getRawExamples($word); $this->wotd = $dictionary->getRawWordOfTheDay(); $this->random = $dictionary->getRawRandomWord(); $this->defsArray = Wordnik::getAllDefinitions($word); $this->firstDef = Wordnik::getFirstDefinition($word); }