コード例 #1
0
 protected final function testContentFieldValueAtomic($mContentFieldValue)
 {
     if (!$this instanceof AnwStructuredContentField_atomic) {
         throw new AnwUnexpectedException("testContentFieldValueAtomic on a non atomic field");
     }
     //global tests common to all contentfields
     if (!$this->runDynamicParsing() && AnwParser::contentHasDynamicParsing($mContentFieldValue)) {
         $sTags = '<' . implode('> <', AnwParser::getDynamicParsingTags()) . '>';
         $sError = AnwComponent::g_editcontent("err_contentfield_dynamic_parsing_disabled", array('tags' => $sTags));
         throw new AnwInvalidContentFieldValueException($sError);
     }
     if (!$this->runDynamicPhp() && AnwUtils::contentHasPhpCode($mContentFieldValue)) {
         $sError = AnwComponent::g_editcontent("err_contentfield_dynamic_php_disabled");
         throw new AnwInvalidContentFieldValueException($sError);
     }
     //tests related to contentfield type
     $this->doTestContentFieldValue($mContentFieldValue);
 }