public function getTable() { if (empty($this->_table)) { $low = strtolower(StringMethods::singular(get_class($this))); $slash = strpos($low, "\\"); if ($slash) { $this->_table = substr($low, $slash + 1); } else { $this->_table = $low; } } return $this->_table; }
/** * Return user defined table name or default to * singular form of current Model's class name * @return string Table name */ public function getTable() { if (empty($this->_table)) { $this->_table = strtolower(StringMethods::singular(get_class($this))); } return $this->_table; }