GraphQL\Examples\Blog\Type\Scalar\EmailType::create PHP Method

create() public static method

public static create ( )
    public static function create()
    {
        return new CustomScalarType(['name' => 'Email', 'serialize' => [__CLASS__, 'serialize'], 'parseValue' => [__CLASS__, 'parseValue'], 'parseLiteral' => [__CLASS__, 'parseLiteral']]);
    }

Usage Example

Esempio n. 1
0
 public static function email()
 {
     return self::$emailType ?: (self::$emailType = EmailType::create());
 }