PageRenderTime 23ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/apps/learn/domain/Cell.php

http://zoop.googlecode.com/
PHP | 21 lines | 18 code | 3 blank | 0 comment | 0 complexity | f5c2c1db535e2e5b18c97a26cc951cf2 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. class Cell
  3. {
  4. private $letter;
  5. function setLetter($leter)
  6. {
  7. $this->letter = $leter;
  8. }
  9. function getLetter()
  10. {
  11. return $this->letter;
  12. }
  13. public function draw($row, $col)
  14. {
  15. echo $this->letter ? '<textarea rows="1" cols="2" name="cell[' . $row . '][' . $col . ']">' . $this->letter . '</textarea>'
  16. : '<textarea rows="1" cols="2" name="cell[' . $row . '][' . $col . ']"></textarea>';
  17. }
  18. }