Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added some examples for QOM and the fluent interface (might need some…

… more tweaking)
  • Loading branch information...
commit 88c322fe772b5e08f5ce79970b5869c839bf73ed 1 parent fc29479
@lsmith77 lsmith77 authored
Showing with 35 additions and 0 deletions.
  1. +35 −0 doc/slides/slides.html
View
35 doc/slides/slides.html
@@ -370,6 +370,41 @@ <h2 style="text-align:center">About PHPCR</h2><br/>
</div>
<div class="slide">
+ <h2>Search via QOM API</h2>
+ <pre class="brush: php">
+ $qm = $workspace->getQueryManager();
+ $factory = $qm->getQOMFactory();
+
+ // SELECT * FROM nt:file INNER JOIN nt:folder ON ISCHILDNODE(child, parent)
+ $factory->createQuery(
+ $factory->join(
+ $factory->selector('nt:file'),
+ $factory->selector('nt:folder'),
+ Constants::JCR_JOIN_TYPE_INNER,
+ $factory->childNodeJoinCondition('child', 'parent')),
+ null,
+ array(),
+ array());
+ </pre>
+ </div>
+
+ <div class="slide">
+ <h2>Search via Fluent Query API</h2>
+ <pre class="brush: php">
+ $qm = $workspace->getQueryManager();
+ $factory = $qm->getQOMFactory();
+
+ // SELECT * FROM nt:unstructured WHERE name NOT IS NULL
+ $qb = new QueryBuilder($factory);
+ $qb->select($factory->selector('nt:unstructured'))
+ ->where($factory->propertyExistance('name'))
+ ->setFirstResult(10)
+ ->setMaxResults(10)
+ ->execute();
+ </pre>
+ </div>
+
+ <div class="slide">
<h2>Quality</h2>
<p style="font-size:1.2em">A test suite for PHPCR makes sure all implementations interpret the specification the same way.</p>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.