1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Docs updated (added also empty files for missing docs/codes)

This commit is contained in:
zYne 2006-08-30 11:37:09 +00:00
parent 186b4465ad
commit 9f03f21df7
97 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<?php
$coll = new Doctrine_Collection('User');
$coll[0]->name = 'Arnold';
$coll[1]->name = 'Somebody';
$coll->save();
?>

View File

@ -0,0 +1,15 @@
<?php
$q = new Doctrine_Query();
$q->from('User(COUNT(id))');
// returns an array
$a = $q->execute();
// selecting multiple aggregate values:
$q = new Doctrine_Query();
$q->from('User(COUNT(id)).Phonenumber(MAX(phonenumber))');
$a = $q->execute();
?>

View File

@ -0,0 +1,5 @@
<?php
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_LISTENER, new MyListener());
?>

View File

@ -0,0 +1,20 @@
<?php
// setting a global level attribute
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_VLD, false);
// setting a connection level attribute
// (overrides the global level attribute on this connection)
$conn = $manager->openConnection(new PDO('dsn', 'username', 'pw');
$conn->setAttribute(Doctrine::ATTR_VLD, true);
// setting a table level attribute
// (overrides the connection/global level attribute on this table)
$table = $conn->getTable('User');
$table->setAttribute(Doctrine::ATTR_LISTENER, new UserListener());
?>

View File

@ -0,0 +1,7 @@
<?php
Doctrine::compile();
// on some other script:
require_once("path_to_doctrine/Doctrine.compiled.php");
?>

View File

View File