. */ require_once 'phing/system/io/PhingFile.php'; /** * Analyzer element for the PhpDependTask * * @package phing.tasks.ext.pdepend * @author Benjamin Schultz * @version $Id: PhpDependAnalyzerElement.php 905 2010-10-05 16:28:03Z mrook $ * @since 2.4.1 */ class PhpDependAnalyzerElement { /** * The type of the analyzer * * @var string */ protected $_type = ''; /** * The value(s) for the analyzer option * * @var array */ protected $_value = array(); /** * Sets the analyzer type * * @param string $type Type of the analyzer * * @return void */ public function setType($type) { $this->_type = $type; switch ($this->_type) { case 'coderank-mode': break; default: throw new BuildException( "Analyzer '" . $this->_type . "' not implemented" ); } } /** * Get the analyzer type * * @return string */ public function getType() { return $this->_type; } /** * Sets the value for the analyzer * * @param string $value Value for the analyzer * * @return void */ public function setValue($value) { $this->_value = array(); $token = ' ,;'; $values = strtok($value, $token); while ($values !== false) { $this->_value[] = $values; $values = strtok($token); } } /** * Get the analyzer value * * @return string */ public function getValue() { return $this->_value; } }