예제 #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;
 }