コード例 #1
0
ファイル: index.php プロジェクト: Bobtnt/PCG
Zend_Debug::Dump($bug->reportedBy->getId());
unset($bug);
$bug = new bug($newbugid);
Zend_Debug::Dump($bug->reportedBy->getId());
echo '<hr>';
$group = new groups(1);
echo $group->users->count();
//Zend_Debug::Dump($group->users);
echo '<hr>';
$u = new user(1);
echo $u->groups_collection->count();
echo '<hr>';
$g = new groups();
$g->save();
$gid = $g->getId();
$g->setName('My new Group ' . $g->getId())->save();
Zend_Debug::Dump($g->getName());
$uc = new user_collection();
$uc->select("SELECT * FROM user");
$i = 0;
foreach ($uc as $u) {
    if ($i == 1) {
        $u->remove();
    }
    $i++;
}
$g->user_collection = $uc;
$g->save();
unset($g);
$gg = new groups($gid);
Zend_Debug::Dump($gg->user_collection->count());