コード例 #1
0
ファイル: Method.php プロジェクト: shawware/coding-challenge
 /**
  * Constructs a new method based on the given information.
  * 
  * @param string $name the new method's name
  * @param string $returnType the new method's return type
  * @param array $parameters the new method's parameters
  * @param array $constraints the new method's constraint(s)
  */
 public function __construct($name, $returnType, $parameters, $constraints)
 {
     parent::__construct($name);
     Validator::validateString($returnType, 'return type');
     Validator::validateTypedArray($parameters, 'Shawware\\CodingChallenge\\Model\\Parameter', 'parameters');
     Validator::validateStringArray($constraints, 'constraints');
     $this->name = $name;
     $this->returnType = $returnType;
     $this->parameters = $parameters;
     $this->constraints = $constraints;
 }