Class PHPCrosswordClient

Description
Variable Summary
mixed $cols
mixed $groupid
mixed $html
mixed $items
mixed $max_tries
mixed $rows
mixed $url
mixed $words
mixed $_error
mixed $_letters
mixed $_map
mixed $_nr
Method Summary
PHPCrosswordClient PHPCrosswordClient (string $server_url)
boolean generate ()
int getCols ()
string getError ()
char|NULL getLetter (int $x, int $y)
int|NULL getQuestionNr (int $x, int $y)
array getQuestions (int $axis)
array getQuestionsH ()
array getQuestionsV ()
int getRows ()
int getWords ()
void setCols (int $cols)
void setGeneratorAccessMethod ( $method, string $type)
void setGroupID (string $groupid)
void setMaxTries (int $max_tries)
void setRows (int $rows)
void setWords (int $words)
boolean __generate ()
string __getXML ()
string __getXML_Direct ()
string __getXML_HTTP ()
boolean __load ( &$tree, array $tree)
void __loadItem ( &$tree, array $tree)
void __loadItems ( &$tree, array $tree)
Variables
mixed $cols = 15 (line 37)
mixed $groupid = 'en' (line 41)
mixed $html (line 43)
mixed $items = array() (line 44)
mixed $max_tries = 10 (line 40)
mixed $rows = 15 (line 38)
mixed $url (line 36)
mixed $words = 15 (line 39)
mixed $_error (line 51)
mixed $_generator_access_method = 'http' (line 49)
mixed $_letters = array() (line 46)
mixed $_map = array() (line 45)
mixed $_nr = 0 (line 47)
Methods
Constructor PHPCrosswordClient (line 57)

Constructor

PHPCrosswordClient PHPCrosswordClient (string $server_url)
  • string $server_url: PHP Crossword server URL
generate (line 156)

Try to generate crossword until we get items

  • return: TRUE - if success
boolean generate ()
getCols (line 84)

Get columns number

int getCols ()
getError (line 93)

Get error message

string getError ()
getLetter (line 349)

Get letter

char|NULL getLetter (int $x, int $y)
  • int $x
  • int $y
getQuestionNr (line 360)

Get question number

int|NULL getQuestionNr (int $x, int $y)
  • int $x
  • int $y
getQuestions (line 391)

Get questions

array getQuestions (int $axis)
  • int $axis
getQuestionsH (line 372)

Get horizontal questions

array getQuestionsH ()
getQuestionsV (line 381)

Get vertical questions

array getQuestionsV ()
getRows (line 111)

Get rows number

int getRows ()
getWords (line 129)

Get words number

int getWords ()
setCols (line 75)

Set columns number

void setCols (int $cols)
  • int $cols
setGeneratorAccessMethod (line 147)

Set generator access method (http/direct)

void setGeneratorAccessMethod ( $method, string $type)
  • string $type
  • $method
setGroupID (line 66)

Set words group ID

void setGroupID (string $groupid)
  • string $groupid
setMaxTries (line 138)

Set maximum number of tries to pick the word (for the generator)

void setMaxTries (int $max_tries)
  • int $max_tries
setRows (line 102)

Set rows number

void setRows (int $rows)
  • int $rows
setWords (line 120)

Set words number

void setWords (int $words)
  • int $words
__generate (line 175)

Call the server

  • return: TRUE - if success
  • private:
boolean __generate ()
__getXML (line 203)

Get crossword XML

  • return: XML
  • private:
string __getXML ()
__getXML_Direct (line 240)

Call generator directly

  • return: XML
  • private:
string __getXML_Direct ()
__getXML_HTTP (line 219)

Fetch XML using HTTP protocol

  • return: XML
  • private:
string __getXML_HTTP ()
__load (line 263)

Load generator result

  • return: TRUE - if success
  • private:
boolean __load ( &$tree, array $tree)
  • array $tree
  • &$tree
__loadItem (line 310)

Load generator result item

  • private:
void __loadItem ( &$tree, array $tree)
  • array $tree
  • &$tree
__loadItems (line 292)

Load generator result items

  • private:
void __loadItems ( &$tree, array $tree)
  • array $tree
  • &$tree

Documentation generated on Sun, 02 Jan 2011 23:22:12 +0000 by phpDocumentor 1.4.3