public function testThatEvenSomeTinyStringsAreValidStrings() { $validator = new C3op_Util_ValidString(); $string = "A"; $this->assertTrue($validator->isValid($string)); $string = "bc"; $this->assertTrue($validator->isValid($string)); $string = "0"; $this->assertTrue($validator->isValid($string)); }
public function SetDescription($description) { $validator = new C3op_Util_ValidString(); if ($validator->isValid($description)) { if ($this->description != $description) { $this->description = $description; } } else { throw new C3op_Projects_HumanResourceException("This ({$description}) is not a valid description."); } }
public function SetTitle($title) { $validator = new C3op_Util_ValidString(); if ($validator->isValid($title)) { if ($this->title != $title) { $this->title = $title; } } else { throw new C3op_Projects_ReceivableException("This ({$title}) is not a valid title."); } }
public function SetName($name) { $validator = new C3op_Util_ValidString(); if ($validator->isValid($name)) { if ($this->name != $name) { $this->name = $name; } } else { throw new C3op_Auth_UserException("This ({$name}) is not a valid name."); } }
public function SetWebsite($website) { $validator = new C3op_Util_ValidString(); if ($validator->isValid($website)) { if ($this->website != $website) { $this->website = $website; } } else { throw new C3op_Register_InstitutionException("This ({$website}) is not a valid website."); } }
public function SetPosition($position) { $validator = new C3op_Util_ValidString(); if ($validator->isValid($position)) { if ($this->position != $position) { $this->position = $position; } } else { throw new C3op_Register_LinkageException("This ({$position}) is not a valid Local Register Number."); } }