示例#1
0
 public function isValid($value)
 {
     $this->_setValue($value);
     $slug = MAL_Util_TextFormatting::MakeSlug($value);
     $m_projects = new GD_Model_ProjectsMapper();
     $existing_project = $m_projects->getProjectBySlug($slug);
     if (is_null($existing_project)) {
         return true;
     } else {
         $this->_error(self::ISUNIQUE);
         return false;
     }
 }
示例#2
0
 public function setName($value)
 {
     $this->_name = (string) $value;
     $this->setSlug(MAL_Util_TextFormatting::MakeSlug($value));
     return $this;
 }