当前位置: 首页>>代码示例>>PHP>>正文


PHP collection::attribs方法代码示例

本文整理汇总了PHP中collection::attribs方法的典型用法代码示例。如果您正苦于以下问题:PHP collection::attribs方法的具体用法?PHP collection::attribs怎么用?PHP collection::attribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在collection的用法示例。


在下文中一共展示了collection::attribs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Book

}
$aBook->dumpview(true);
$newBook->dumpview(true);
dbm_debug('info', 'Creating the Book "The Art of the Rifle"');
$aBook = new Book();
$aBook->attribs(array('isbn' => '9781581603071', 'author' => 'Jeff Cooper', 'title' => 'The Art of the Rifle', 'pubyear' => '2002'));
$aBook->save();
$aBook->dumpview(true);
dbm_debug('info', 'Creating the Book "The Revolution: A Manifesto"');
$aBook = new Book();
$aBook->attribs(array('title' => 'The Revolution: A Manifesto', 'isbn' => '0-446-53751-9', 'author' => 'Ron Paul', 'pubyear' => '2008'));
$aBook->save();
$aBook->dumpview(true);
dbm_debug('info', 'Creating the Collection "Rich\'s Favorite Books"');
$pub = new collection();
$pub->attribs(array('name' => "Rich's Favorite Books"));
$pub->save();
$pub->dumpview(true);
dbm_debug('heading', 'Testing linking functions. . .');
dbm_debug('info', 'Loading book 2 . . . ');
$greatBook = new Book(2);
// Loads Cooper's book from the database
dbm_debug('info', 'done.');
$greatBook->dumpview(true);
dbm_debug('info', 'Creating a fresh Review . . . ');
$myReview = new Review();
// Create a new review
dbm_debug('info', 'Done.');
dbm_debug('info', 'Table Definitions for $myReview:');
dbm_debug('data', $myReview->getTableDefs());
$myReview->dumpview(true);
开发者ID:rmbwebs,项目名称:amortize,代码行数:31,代码来源:test_generic.php


注:本文中的collection::attribs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。