예제 #1
0
 /**
  * Creates a new Role object.
  *
  * @param  string $type
  * @throws \Khill\Lavacharts\Exceptions\InvalidColumnRole
  */
 public function __construct($type)
 {
     if (in_array($type, $this->validRoles) === false) {
         throw new InvalidColumnRole($type);
     }
     parent::__construct($type);
 }
예제 #2
0
 public function __construct($value)
 {
     try {
         parent::__construct($value);
     } catch (\Exception $e) {
         throw new InvalidLabel($value);
     }
 }