code: public function fillByArray(array $arr, $allow_default = false) {
          $count  = 0;
          foreach ($this->getDefault() as $name => $default) {
              if ($allow_default && !isset($arr[$count])) {
                  $this->$name = $default;
                  continue;
              }
              $this->$name = $arr[$count];
              $count++;
          }
      }
docs: 根据数字下标的array填充
  @param array $arr
  @param boolean $allow_default
  @return array