Esempio n. 1
0
 /**
  * Gets the resource type of the current object. 
  * User_Model_User -> user
  * Album_Model_Photo -> album_photo
  *
  * @return string The type identifier (i.e. user, group, etc)
  */
 public function getType($inflect = false)
 {
     if (null === $this->_type) {
         $this->_type = Khcn_Api::classToType(get_class($this), $this->getModuleName());
     }
     if ($inflect) {
         return str_replace(' ', '', ucwords(str_replace('_', ' ', $this->_type)));
     }
     return $this->_type;
 }