private function setMetadataFromDefaultValue (ReflectionProperty $prop, $v)
  {
    $prop->default = $v;

    // If the type has not yet been defined, it will be defined implicitly via the default value.
    if (!isset($prop->type))
      switch (gettype ($v)) {
        case 'string':
          $prop->type = type::string;
          break;
        case 'boolean':
          $prop->type = type::bool;
          break;
        case 'integer':
        case 'double':
          $prop->type = type::number;
          break;
        case 'NULL':
          // Don't bother setting a NULL default.
          break;
      }
  }
private function setMetadataFromDefaultValue (ReflectionProperty $prop, $v)
  {
    $prop->default = $v;

    // If the type has not yet been defined, it will be defined implicitly via the default value.
    if (!isset($prop->type))
      switch (gettype ($v)) {
        case 'string':
          $prop->type = type::string;
          break;
        case 'boolean':
          $prop->type = type::bool;
          break;
        case 'integer':
        case 'double':
          $prop->type = type::number;
          break;
        case 'NULL':
          // Don't bother setting a NULL default.
          break;
      }
  }
private function setMetadataFromDefaultValue ( ReflectionProperty $ prop , $ v ) { $ prop -> default = $ v ; // If the type has not yet been defined, it will be defined implicitly via the default value. if ( ! isset ( $ prop -> type ) ) switch ( gettype ( $ v ) ) { case 'string' : $ prop -> type = type :: string ; break ; case 'boolean' : $ prop -> type = type :: bool ; break ; case 'integer' : case 'double' : $ prop -> type = type :: number ; break ; case 'NULL' : // Don't bother setting a NULL default. break ; } }
Set the default value explicitly.

@param ReflectionProperty $prop
@param mixed              $v
Set the default value explicitly .