コード例 #1
0
ファイル: Datetime.php プロジェクト: fnu/php-orm
 public function toPhpValue()
 {
     if (null === $this->getDefault()) {
         return parent::toPhpValue();
     }
     return "'{$this->getDefault()}'";
 }
コード例 #2
0
ファイル: Mediumint.php プロジェクト: fnu/php-orm
 public function toPhpValue()
 {
     if (null === $this->getDefault()) {
         return parent::toPhpValue();
     }
     return intval($this->getDefault());
 }
コード例 #3
0
ファイル: Tab.php プロジェクト: fnu/php-orm
 /**
  *
  * @param \G\Tab\DataType_Abstract $field
  */
 protected function toAttributeItem($field)
 {
     $str = "\n" . $field->toAttributeComment() . '    protected $' . $field->toAttributeName() . " = " . $field->toPhpValue() . ";\n";
     return $str;
 }