withType() публичный статический Метод

public static withType ( string $type ) : self
$type string
Результат self
Пример #1
0
 /**
  * @param string $type
  * @throws InvalidModuleExtraType
  */
 public function __construct($type)
 {
     if (!in_array($type, self::getPossibleTypes())) {
         throw InvalidModuleExtraType::withType($type);
     }
     $this->type = $type;
 }