コード例 #1
0
ファイル: charcoal.inc.php プロジェクト: stk2k/charcoalphp2
/**
 *    intをIntegerオブジェクトに変換
 **/
function i($value)
{
    if ($value instanceof Charcoal_Integer) {
        return $value;
    }
    return $value !== NULL ? new Charcoal_Integer($value) : Charcoal_Integer::defaultValue();
}
コード例 #2
0
ファイル: Integer.class.php プロジェクト: stk2k/charcoalphp2
 public function add(Charcoal_Integer $add)
 {
     return new Charcoal_Integer($this->getValue() + $add->getValue());
 }