コード例 #1
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "OrderByClause":
             try {
                 $this->objOrderByClause = QType::Cast($mixValue, 'QQOrderBy');
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ReverseOrderByClause":
             try {
                 $this->objReverseOrderByClause = QType::Cast($mixValue, 'QQOrderBy');
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Format":
             try {
                 $this->strFormat = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PostMethod":
             try {
                 $this->strPostMethod = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PostCallback":
             $this->objPostCallback = $mixValue;
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
コード例 #2
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "Closure":
             if (!is_callable($mixValue)) {
                 throw new QInvalidCastException("Closure must be a callable object");
             }
             $this->objClosure = $mixValue;
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }