com presentations: Added phplib slides: phphhvm-tek15.xml slides/mongodb/logo-composer-transparent3.png slides/mongodb/phplib-usage-2.xml slides/mongodb/phplib.xml
[email protected] (Derick Rethans) Tue, 19 May 2015 21:54:51 +0000
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: bf44fd79d8daf1ef2aef4fb9476b5846044c726b Author: Derick Rethans <[email protected]> Tue, 19 May 2015 16:54:51 -0500 Parents: 126fad3728fd40981fcdc1f45698ad1522ec0e89 Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=bf44fd79d8daf1ef2aef4fb9476b5846044c726b Log: Added phplib slides Changed paths: M phphhvm-tek15.xml A slides/mongodb/logo-composer-transparent3.png A slides/mongodb/phplib-usage-2.xml A slides/mongodb/phplib.xml Diff: diff --git a/phphhvm-tek15.xml b/phphhvm-tek15.xml index 840ca7d..32aeef5 100644 --- a/phphhvm-tek15.xml +++ b/phphhvm-tek15.xml @@ -133,6 +133,9 @@ Composer <slide>slides/mongodb/api-phongo.xml</slide> <slide>slides/mongodb/api-hippo.xml</slide> +<slide>slides/mongodb/phplib.xml</slide> +<slide>slides/mongodb/phplib-usage-2.xml</slide> + <!-- ISSUES --> HHVM is not mature, and certainly not documented. diff --git a/slides/mongodb/logo-composer-transparent3.png b/slides/mongodb/logo-composer-transparent3.png new file mode 100644 index 0000000..562f032 Binary files /dev/null and b/slides/mongodb/logo-composer-transparent3.png differ diff --git a/slides/mongodb/phplib-usage-2.xml b/slides/mongodb/phplib-usage-2.xml new file mode 100644 index 0000000..40da6e6 --- /dev/null +++ b/slides/mongodb/phplib-usage-2.xml @@ -0,0 +1,31 @@ +<slide> +<title>phplib usage</title> + +<example><![CDATA[<?php +require 'vendor/autoload.php'; +$m = new MongoDB\Client("mongodb://localhost:27017"); +$d = $m->selectDatabase( 'demo' ); +$c = $d->selectCollection( 'test' ); + +$c->drop(); + +$doc = [ + 'string' => 'bar', + 'number_i' => 55, + 'number_l' => 12345678901234567, + 'bool' => true, + 'null' => null, + 'float' => M_PI, +]; + +$r = $c->insertOne( $doc ); + +$cursor = $c->find( [] ); + +foreach ( $cursor->toArray() as $key => $result ) +{ + print_r( $result ); +} +?>]]> +</example> +</slide> diff --git a/slides/mongodb/phplib.xml b/slides/mongodb/phplib.xml new file mode 100644 index 0000000..8270eb0 --- /dev/null +++ b/slides/mongodb/phplib.xml @@ -0,0 +1,12 @@ +<slide> +<title>phplib</title> + +<image filename="logo-composer-transparent3.png" align="right"/> +<list> +<bullet>Userland library sitting on top of Phongo/Hippo</bullet> +<bullet>Implements the convenience methods that the basic APIs lack</bullet> +<bullet>Installable by composer: +<example><![CDATA[$ mkdir new-project && cd new-project +$ php composer.phar require mongodb/mongodb]]></example></bullet> +</list> +</slide>