ucwords does not support delimiter on 5.4
This commit is contained in:
parent
048e11d25f
commit
98f5423df7
|
@ -362,7 +362,7 @@ class Comment implements IComment {
|
||||||
protected function fromArray($data) {
|
protected function fromArray($data) {
|
||||||
foreach(array_keys($data) as $key) {
|
foreach(array_keys($data) as $key) {
|
||||||
// translate DB keys to internal setter names
|
// translate DB keys to internal setter names
|
||||||
$setter = 'set' . str_replace('_', '', ucwords($key,'_'));
|
$setter = 'set' . implode('', array_map('ucfirst', explode('_', $key)));
|
||||||
$setter = str_replace('Timestamp', 'DateTime', $setter);
|
$setter = str_replace('Timestamp', 'DateTime', $setter);
|
||||||
|
|
||||||
if(method_exists($this, $setter)) {
|
if(method_exists($this, $setter)) {
|
||||||
|
|
Loading…
Reference in New Issue