* @license PHP License * @package WB * @subpackage unittest */ Testing_FIT_Loader::loadClass( 'Testing_FIT_Fixture' , 'Testing_FIT_Fixture_Column' ); /** * FIT Test * * Base_Param * * @version 0.1.0 * @package WB * @subpackage FIT */ class Dictionary_Url extends Testing_FIT_Fixture_Column { /** * URL String * * @var string */ public $url = null; /** * URL String * @var string */ private $cURL = null; /** * Current Record * @var array */ private $rec = array(); /** * table * @var WBDatasource_Table */ protected $table; /** * dictionary - system under test * @var WBDictionary_URL */ protected $dict; /** * constructor */ public function __construct() { parent::__construct(); $this->table = WBClass::create('WBDatasource_Table'); $this->dict = WBClass::create('WBDictionary_URL'); } /** * Get Protocol * * @return string */ public function protocol() { $this->addWord($this->url); return $this->rec['protocol']; } /** * Get Host * * @return string */ public function host() { $this->addWord($this->url); return $this->rec['host']; } /** * Get Path * * @return string */ public function path() { $this->addWord($this->url); return $this->rec['path']; } private function addWord() { if ($this->url == $this->cURL) { return; } $this->cURL = $this->url; $this->dict->addWord($this->cURL); $this->rec = $this->dict->get(); } }