Skip to content

Commit

Permalink
Using namespaceSplit
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 11, 2013
1 parent 2980839 commit b907196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/ORM/Table.php
Expand Up @@ -223,7 +223,7 @@ public function table($table = null) {
$this->_table = $table;
}
if ($this->_table === null) {
$table = explode('\\', get_class($this));
$table = namespaceSplit(get_class($this));
$table = substr(end($table), 0, -5);
if (empty($table)) {
$table = $this->alias();
Expand All @@ -244,7 +244,7 @@ public function alias($alias = null) {
$this->_alias = $alias;
}
if ($this->_alias === null) {
$alias = explode('\\', get_class($this));
$alias = namespaceSplit(get_class($this));
$alias = substr(end($alias), 0, -5) ?: $this->_table;
$this->_alias = $alias;
}
Expand Down

0 comments on commit b907196

Please sign in to comment.