public function getAttributeValue($name, $default_value = null)
    {
        $value = parent::getAttribute($name);

        if ($value === '') {
            $value = $default_value;
        }

        return $value;
    }
public function getAttributeValue($name, $default_value = null)
    {
        $value = parent::getAttribute($name);

        if ($value === '') {
            $value = $default_value;
        }

        return $value;
    }
public function getAttributeValue ( $ name , $ default_value = null ) { $ value = parent :: getAttribute ( $ name ) ; if ( $ value === '' ) { $ value = $ default_value ; } return $ value ; }
Returns the value of the given attribute or returns the given
default value if the attribute is missing.

@param string $name name of attribute
@param mixed $default_value value to return if attribute is missing

@return mixed string value of attribute or default_value if attribute is not found or empty
Returns the value of the given attribute or returns the given default value if the attribute is missing .