本文整理汇总了PHP中MemModel::containsAny方法的典型用法代码示例。如果您正苦于以下问题:PHP MemModel::containsAny方法的具体用法?PHP MemModel::containsAny怎么用?PHP MemModel::containsAny使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemModel
的用法示例。
在下文中一共展示了MemModel::containsAny方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Statement
$model->add(new Statement($myhomepage, $creation_date, $August16));
$model2->add(new Statement($myhomepage, $creation_date, $August16));
$language = new Resource("http://www.example.org/terms/language");
$deutsch = new Literal("Deutsch", "de");
$model->add(new Statement($myhomepage, $language, $deutsch));
$name = new Resource("http://www.example.org/terms/Name");
$chrisbizer = new Literal("Chris Bizer");
$model2->add(new Statement($me, $name, $chrisbizer));
// Output as Table
echo "<h5>Model 1</h5>";
$model->writeAsHtmlTable();
echo "<h5>Model 2</h5>";
$model2->writeAsHtmlTable();
echo "<P>";
echo "<h3>2. Make some tests</h3>";
echo "Test: Model 2 contains any statements from model 1 :" . $model2->containsAny($model) . "<p>";
echo "Test: Model 1 contains any statements from model 2 :" . $model->containsAny($model2) . "<p>";
echo "Test: Model 2 contains all statements from model 1 :" . $model2->containsAll($model) . "<p>";
echo "Test: Model 1 contains all statements from model 2 :" . $model->containsAll($model2) . "<p>";
echo "Test: Model 1 equals model 2 :" . $model->equals($model2) . "<p>";
echo "<h3>3. Unite model 1 and model 2</h3>";
$model3 =& $model->unite($model2);
$model3->writeAsHtmlTable();
echo "<h3>4. Intersect model 1 and model 2</h3>";
$model4 =& $model->intersect($model2);
$model4->writeAsHtmlTable();
echo "<h3>5. Substract model 2 from model 1</h3>";
$model5 =& $model->subtract($model2);
$model5->writeAsHtmlTable();
echo "<h3>6. Reify model 1</h3>";
$model6 =& $model->reify();