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


PHP Author::getAuthorId方法代码示例

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


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

示例1: actionAuhtor

 public function actionAuhtor()
 {
     if ($this->session->isLoging()) {
         echo 'Вы уже авторизированны!';
         exit;
     }
     $Author = new Author();
     if ($Author->getOneAuthor($this->params['login'], $this->params['pass'])) {
         $this->session->set('loging', 'loging');
         $this->session->set('author_id', $Author->getAuthorId());
         $this->session->set('login', $Author->getLogin());
         $this->session->set('pass', $Author->getPass());
         $this->session->set('logo', $Author->getLogo());
         $this->session->set('name', $Author->getName());
     }
     $this->view = new View($this->params, PATH_VIEW_MESSAGE, 'welcom_tpl.php', false);
     $this->html->add('content', $this->view->render());
     $layout = new Layout($this->html->getArray());
     $layout->get();
 }
开发者ID:khoteevnd,项目名称:mb,代码行数:20,代码来源:Controller_Author_class.php

示例2: testAnonymousSave

 public function testAnonymousSave()
 {
     $author = new Author();
     $author->setName('Phillip K. Dick');
     $book = new Book();
     $book->setTitle('Minority Report');
     $book2 = new Book();
     $book2->setTitle('Do Androids Dream of Electric Sheep');
     // $library = new Library();
     // $library->setName('Travis County Reader');
     $author->addBook($book);
     $author->addBook($book2);
     $this->assertEqual(count($author->getBook_Collection()), 2);
     // $book2library = new Book2library();
     // $book2library->setLibrary_Object($library);
     // $book->addBook2library($book2library);
     // $book2->addBook2library($book2library);
     // $this->db->getDb()->startLoggingQueries();
     $author->save();
     // $this->dump($author->getBook_Collection());
     // print_r($this->db->getDb()->getQueryLog());
     $this->assertNotNull($author->getAuthorId());
     $this->assertNotNull($book->getBookId());
     $this->assertNotNull($book->getAuthorId());
     $this->assertIdentical($book->getAuthorId(), $author->getAuthorId());
     $this->assertNotNull($book2->getBookId());
     $this->assertNotNull($book2->getAuthorId());
     $this->assertIdentical($book2->getAuthorId(), $author->getAuthorId());
 }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:29,代码来源:TestCoughObject.class.php


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