コード例 #1
0
ファイル: CHtmlSpec.class.php プロジェクト: fbone/mediboard4
    /**
     * @see parent::sample()
     */
    function sample($object, $consistent = true)
    {
        parent::sample($object, $consistent);
        $object->{$this->fieldName} = <<<EOD
<h1>Titre 1</h1>
<p>Paragraphe</p>
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>
EOD;
    }
コード例 #2
0
ファイル: CFloatSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = self::randomString(CMbFieldSpec::$nums, 2) . "." . self::randomString(CMbFieldSpec::$nums, 2);
 }
コード例 #3
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = inet_pton("127.0.0.1");
 }
コード例 #4
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $nums = preg_replace("/[^0-9]/", "", CAppUI::conf("system phone_number_format"));
     $object->{$this->fieldName} = self::randomString(range(0, 9), strlen($nums));
 }
コード例 #5
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = self::randomString(array_merge(range('0', '9'), range('a', 'z'), range('A', 'Z')), 8);
 }
コード例 #6
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = "*****@*****.**";
 }
コード例 #7
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $chars = array_merge(CMbFieldSpec::$chars, array(' ', ' ', ', ', '. '));
     $object->{$this->fieldName} = self::randomString($chars, 200);
 }
コード例 #8
0
ファイル: CDateSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = sprintf("19%02d-%02d-%02d", self::randomString(CMbFieldSpec::$nums, 2), self::randomString(CMbFieldSpec::$months, 1), self::randomString(CMbFieldSpec::$days, 1));
 }
コード例 #9
0
ファイル: CNumSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $propValue =& $object->{$this->fieldName};
     if ($this->length) {
         $propValue = self::randomString(CMbFieldSpec::$nums, $this->length);
     } elseif ($this->minLength) {
         $propValue = self::randomString(CMbFieldSpec::$nums, max($this->minLength, $this->_defaultLength));
     } elseif ($this->maxLength) {
         $propValue = self::randomString(CMbFieldSpec::$nums, min($this->maxLength, $this->_defaultLength));
     } elseif ($this->max || $this->min) {
         $min = $this->min !== null ? $this->min : 0;
         $max = $this->max !== null ? $this->max : 999999;
         $propValue = rand($min, $max);
     } else {
         $propValue = self::randomString(CMbFieldSpec::$nums, $this->_defaultLength);
     }
 }
コード例 #10
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $propValue =& $object->{$this->fieldName};
     // ccam
     if ($this->ccam) {
         $propValue = "BFGA004";
     } elseif ($this->cim10) {
         $propValue = "H251";
     } elseif ($this->adeli) {
         $propValue = "123456789";
     } elseif ($this->rib) {
         $propValue = "11111111111111111111111";
     } elseif ($this->siret) {
         $propValue = "73282932000074";
     } elseif ($this->insee) {
         $propValue = "100000000000047";
     }
 }
コード例 #11
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = "telnet://mediboard.org";
 }
コード例 #12
0
ファイル: CStrSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $propValue =& $object->{$this->fieldName};
     if ($this->length) {
         $propValue = self::randomString(CMbFieldSpec::$chars, $this->length);
     } elseif ($this->minLength) {
         if ($this->_defaultLength < $this->minLength) {
             $propValue = self::randomString(CMbFieldSpec::$chars, $this->minLength);
         } else {
             $propValue = self::randomString(CMbFieldSpec::$chars, $this->_defaultLength);
         }
     } elseif ($this->maxLength) {
         if ($this->_defaultLength > $this->maxLength) {
             $propValue = self::randomString(CMbFieldSpec::$chars, $this->maxLength);
         } else {
             $propValue = self::randomString(CMbFieldSpec::$chars, $this->_defaultLength);
         }
     } else {
         $propValue = self::randomString(CMbFieldSpec::$chars, $this->_defaultLength);
     }
 }
コード例 #13
0
ファイル: CBoolSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = rand(0, 1);
 }
コード例 #14
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = "19" . self::randomString(CMbFieldSpec::$nums, 2) . "-" . self::randomString(CMbFieldSpec::$months, 1) . "-" . self::randomString(CMbFieldSpec::$days, 1) . " " . self::randomString(CMbFieldSpec::$hours, 1) . ":" . self::randomString(CMbFieldSpec::$mins, 1) . ":" . self::randomString(CMbFieldSpec::$mins, 1);
 }
コード例 #15
0
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $specFragments = $this->getListValues($this->list);
     $object->{$this->fieldName} = self::randomString($specFragments, 1);
 }
コード例 #16
0
ファイル: CColorSpec.class.php プロジェクト: fbone/mediboard4
 /**
  * @see parent::sample()
  */
 function sample($object, $consistent = true)
 {
     parent::sample($object, $consistent);
     $object->{$this->fieldName} = sprintf('#%02X%02X%02X', rand(0, 255), rand(0, 255), rand(0, 255));
 }