public static function loadContentClassInterface($sContentClassName)
 {
     if (class_exists('AnwIContentClassPageDefault_' . $sContentClassName, false)) {
         throw new AnwUnexpectedException("Interface for ContentClass " . $sContentClassName . " is already defined");
     }
     AnwContentClassPage::loadComponentInterface($sContentClassName);
 }
Example #2
0
 private function parseChainedInstructions($oCallItem, $sInstructions, $sOperator)
 {
     //execute all chained instructions
     $asInstructions = explode('.', $sInstructions);
     /*if (!($oCallItem instanceof AnwContentPage)) $mLastValue = $oCallItem->getContent(); //we are in a fetching loop, we have a Page
     		else */
     $mLastValue = $oCallItem;
     //we are in a loop-loop, we already have a SubContent
     while (count($asInstructions) > 0) {
         $sCallInstruction = array_shift($asInstructions);
         if (trim($sCallInstruction) != "") {
             self::debug("pubcall chain: " . get_class($oCallItem) . "->pubcall(" . $sCallInstruction . "," . get_class($mLastValue) . ")");
             if (!$oCallItem instanceof AnwPubcallCapability) {
                 self::debug("ERROR - parseLoopVariable, looping on instructions, callItem is not pubcallable");
                 return $sString;
             }
             $mLastValue = $oCallItem->pubcall($sCallInstruction, $mLastValue);
             $oCallItem = $mLastValue;
         }
     }
     //execute operator if any
     if ($sOperator) {
         //do we have args for operator?
         $asOperatorArgs = array();
         $asTmpOperatorArgs = explode(',', $sOperator);
         if (count($asTmpOperatorArgs) > 1) {
             $sOperator = array_shift($asTmpOperatorArgs);
             $asOperatorArgs = $asTmpOperatorArgs;
         }
         unset($asTmpOperatorArgs);
         //self::debug("pubcall chain: pubcallOperator(".$sOperator.",".$mLastValue.")");
         $mLastValue = AnwContentClassPage::pubcallOperator($sOperator, $mLastValue, $this->oPage->getLang(), $asOperatorArgs);
     }
     $sResult = $mLastValue;
     //result of the last call of the chain
     return $sResult;
 }