PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Bartlomiej Rudzki  >  EVDB  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: EVDB
Store and retrieve objects in MongoDB databases
Author: By
Last change:
Date: 4 years ago
Size: 415 bytes


Class file image Download


$user = EVDB::findUserByLogin('foo');
if (!
$user instanceof EVDBObject) {
$user = EVDB::create('User');
$user->login = 'foo';
$user->views = 5; // notice, that "views" property is not the part of the original schema
// onBeforeSave()
// onAfterSave()

echo $user->getViews(); // see plugins/EVDBUserPlugin.class.php