Phpro\SoapClient\CodeGenerator\Util\Normalizer::normalizeDataType PHP Method

normalizeDataType() public static method

public static normalizeDataType ( string $type ) : string
$type string
return string
    public static function normalizeDataType($type)
    {
        return strtr($type, ['long' => 'int', 'short' => 'int', 'dateTime' => '\\DateTime', 'date' => '\\DateTime', 'boolean' => 'bool']);
    }

Usage Example

コード例 #1
0
ファイル: Property.php プロジェクト: phpro/soap-client
 /**
  * Property constructor.
  *
  * @param string $name
  * @param string $type
  */
 public function __construct($name, $type)
 {
     $this->name = Normalizer::normalizeProperty($name);
     $this->type = Normalizer::normalizeDataType($type);
 }