Browse Source

Fixed wrong trimming for "model" from filename to receive tablename #0

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@117 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
aterekhov 15 years ago
parent
commit
a8322c3831
  1. 4
      model/Model.php

4
model/Model.php

@ -128,8 +128,8 @@ abstract class Model
public function table()
{
if (! $this->table) {
$this->table = rtrim(strtolower(get_class($this)), 'model');
$this->table = substr(strtolower(get_class($this)), 0, -5/*strlen('Model')*/);
}
return $this->table;
}
}
}
Loading…
Cancel
Save