示例#1
0
/**
 *    intをIntegerオブジェクトに変換
 **/
function i($value)
{
    if ($value instanceof Charcoal_Integer) {
        return $value;
    }
    return $value !== NULL ? new Charcoal_Integer($value) : Charcoal_Integer::defaultValue();
}
示例#2
0
 public function add(Charcoal_Integer $add)
 {
     return new Charcoal_Integer($this->getValue() + $add->getValue());
 }