Skip to content

Commit

Permalink
Connect to the CAS - round 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sangwin authored and Chris Sangwin committed Feb 8, 2012
1 parent 8c3ed1d commit 52a12de
Show file tree
Hide file tree
Showing 46 changed files with 11,237 additions and 0 deletions.
126 changes: 126 additions & 0 deletions stack/cas/answer.class.php
@@ -0,0 +1,126 @@
<?php
// This file is part of Stack - http://stack.bham.ac.uk//
//
// Stack is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Stack is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Stack. If not, see <http://www.gnu.org/licenses/>.


/**
* A single result returned by maxima
*
*/
class STACK_CAS_Maxima_Answer {

/**
*
*
* @access private
* @var string
*/
private $label;
/**
*
*
* @access private
* @var string
*/
private $display;
/**
*
*
* @access private
* @var string
*/
private $error;
/**
*
*
* @access private
* @var string
*/
private $value;

/**
*
*
* @param string $label
* @param string $value
* @param string $display
* @param string $error
*
*/
public function __construct($label, $value, $display, $error)
{
$this->label = $label;
$this->display = $display;
$this->error = $error;
$this->value = $value;
}

/**
* returns the label
*
* @access public
* @return string
*/
public function getLabel()
{
return $this->label;
}

/**
* returns a string ready for display
*
* @access public
* @return string
*/
public function getDisplay()
{
return $this->display;
}

/**
* returns the raw value
*
* @access public
* @return string
*/
public function getValue()
{
return $this->value;
}

/**
* Returns any errors
*
* @access public
* @return string
*/
public function getError()
{
return $this->error;
}

/**
* Sets the display string
*
* @access public
* @param string
*/
public function setDisplay($text)
{
$this->display = $text;
}


}

0 comments on commit 52a12de

Please sign in to comment.