2
0
forked from Wavyzz/dolibarr

Refactoring and class/method documentation

This commit is contained in:
atm-ph
2017-03-26 14:37:25 +02:00
parent 09f645fc9f
commit ae2ab3276d
5 changed files with 38 additions and 27 deletions

View File

@@ -287,11 +287,11 @@ class CoreObject extends CommonObject
}
elseif($this->is_int($info))
{
$this->{$field} = (int)$obj->{$field};
$this->{$field} = (int) $obj->{$field};
}
elseif($this->is_float($info))
{
$this->{$field} = (double)$obj->{$field};
$this->{$field} = (double) $obj->{$field};
}
elseif($this->is_null($info))
{
@@ -604,7 +604,7 @@ class CoreObject extends CommonObject
* @param string $format Output date format
* @return string
*/
public function get_date($field, $format='')
public function getDate($field, $format='')
{
if(empty($this->{$field})) return '';
else
@@ -620,7 +620,7 @@ class CoreObject extends CommonObject
* @param string $date formatted date to convert
* @return mixed
*/
public function set_date($field, $date)
public function setDate($field, $date)
{
if (empty($date))
{
@@ -648,7 +648,7 @@ class CoreObject extends CommonObject
{
if($this->checkFieldType($key, 'date'))
{
$this->set_date($key, $value);
$this->setDate($key, $value);
}
else if( $this->checkFieldType($key, 'array'))
{