示例#1
0
 public function __set($name, $value)
 {
     switch ($name) {
         case 'octetProperty':
             TypeHinter::to('[EnforceRange] octet', $value);
             break;
         case 'readonlyProperty':
             TypeHinter::throwReadonlyException();
             break;
         default:
             TypeHinter::triggerVisibilityErrorOrDefineProperty();
     }
 }
示例#2
0
 public function callee($value, $type)
 {
     return TypeHinter::to($type, $value, 0, ['CustomEventInit' => ['bubbles' => ['type' => 'boolean', 'default' => false], 'cancelable' => ['type' => 'boolean', 'default' => false], 'detail' => ['type' => 'any', 'default' => null]]]);
 }