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


PHP Folder::getId方法代码示例

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


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

示例1: testDelete

 public function testDelete()
 {
     $folder = new Folder();
     $folder->setId(3);
     $sql = 'DELETE FROM `*PREFIX*news_folders` WHERE `id` = ?';
     $arguments = array($folder->getId());
     $sql2 = 'DELETE FROM `*PREFIX*news_feeds` WHERE `folder_id` = ?';
     $sql3 = 'DELETE FROM `*PREFIX*news_items` WHERE `feed_id` NOT IN ' . '(SELECT `feeds`.`id` FROM `*PREFIX*news_feeds` `feeds`)';
     $arguments2 = array($folder->getId());
     $this->setMapperResult($sql, $arguments);
     $this->setMapperResult($sql2, $arguments2);
     $this->setMapperResult($sql3);
     $this->folderMapper->delete($folder);
 }
开发者ID:hroo772,项目名称:news,代码行数:14,代码来源:FolderMapperTest.php

示例2: getFolderCollection

 public function getFolderCollection($where)
 {
     global $dRep;
     $where = $this->sqlBuilder->createWhere($where, '');
     $sql = "SELECT * FROM ink_folders WHERE {$where} ORDER BY folderOrder;";
     $data = $this->runManyQuery($sql);
     $folders = array();
     foreach ($data as $index => $row) {
         $folder = new Folder();
         $properties = array('id' => $row['folderId'], 'name' => $row['folderName'], 'site' => $row['siteId'], 'parent' => $dRep->getFolder($row['parentId']), 'files' => $dRep->getFileCollection(array('folder' => $row['folderId'])), 'order' => $row['folderOrder']);
         $folder->setProperties($properties);
         $this->folders[$folder->getId()] = $folder;
         $folders[] = $folder;
     }
     return $folders;
 }
开发者ID:ruffen,项目名称:Pixcel-CMS,代码行数:16,代码来源:folder.repository.php

示例3: handleRoadmaps

 public function handleRoadmaps()
 {
     $default_folders = array();
     $conn = Doctrine_Manager::getInstance()->connection();
     $roadmaps = $conn->execute("SELECT id, user_id from `roadmap` WHERE folder_id is NULL")->fetchAll();
     foreach ($roadmaps as $roadmap) {
         if (!array_key_exists($roadmap['user_id'], $default_folders)) {
             $folder = $conn->execute("SELECT id from `folder` WHERE `user_id` = :user_id and `type` = '" . Folder::TYPE_ROADMAP . "' and `deletable` = 0 LIMIT 1;", array(':user_id' => $roadmap['user_id']))->fetchAll();
             if (count($folder)) {
                 $default_folders[$roadmap['user_id']] = $folder[0]['id'];
             } else {
                 $folder = new Folder();
                 $folder->setName('Default');
                 $folder->setUserId($roadmap['user_id']);
                 $folder->setDeletable(0);
                 $folder->setType(Folder::TYPE_ROADMAP);
                 $folder->save();
                 $default_folders[$roadmap['user_id']] = $folder->getId();
             }
         }
         $conn->execute("UPDATE `roadmap` SET `folder_id` = :folder_id WHERE id = :id", array(':folder_id' => $default_folders[$roadmap['user_id']], ':id' => $roadmap['id']));
     }
 }
开发者ID:sensorsix,项目名称:app,代码行数:23,代码来源:106_move_decision_and_roadmap_to_folder.php

示例4: delete

 /**
  * @brief Delete the folder and all its feeds from the database
  * @param folder the folder to be deleted (an instance of OCA\News\Folder)
  * @returns true if the folder has been deleted, false if an error occurred
  */
 public function delete(Folder $folder)
 {
     $folderid = $folder->getId();
     return deleteById(folderid);
 }
开发者ID:netcon-source,项目名称:apps,代码行数:10,代码来源:foldermapper.php

示例5: testGetId

 public function testGetId()
 {
     assertThat($this->folder->getId(), is($this->folderId));
 }
开发者ID:DanielDobre,项目名称:fossology,代码行数:4,代码来源:FolderTest.php

示例6:

 /**
  * This is the constructor for the KTAPI_Folder.
  *
  * @author KnowledgeTree Team
  * @access private
  * @param KTAPI $ktapi
  * @param Folder $folder
  * @return KTAPI_Folder
  */
 function KTAPI_Folder(&$ktapi, &$folder)
 {
     $this->ktapi =& $ktapi;
     $this->folder =& $folder;
     $this->folderid = $folder->getId();
 }
开发者ID:jpbauer,项目名称:knowledgetree,代码行数:15,代码来源:KTAPIFolder.inc.php


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