Documentation is available at PrimitiveFixture.php
- <?php
- # Copyright (c) 2002-2005 Cunningham & Cunningham, Inc.
- # Released under the terms of the GNU General Public License version 2 or later.
- #
- # PHP5 translation by Luis A. Floreani <luis.floreani@gmail.com>
- /**
- * load class Fixture
- */
- include_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'Fixture.php';
- class PrimitiveFixture extends Fixture {
- /**
- * @param Parse cell
- * @return int
- */
- private function parseLong($cell) {
- if (strchr($cell->text(), '.') !== false)
- throw new Exception("NumberFormatException: For input string: \"" . $cell->text(). "\"");
- return (int)$cell->text();
- }
- /**
- * @param Parse cell
- * @param string/int value
- */
- public function check ($cell, $value) {
- if (is_numeric($value)) {
- if (is_int($value)) {
- if ($this->parseLong($cell) == $value) {
- $this->right($cell);
- } else {
- $this->wrong($cell, $value);
- }
- }
- }
- }
- }
- ?>
Documentation generated on Sun, 02 Apr 2006 16:01:05 +0200 by phpDocumentor 1.3.0RC5