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


PHP Entry类代码示例

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


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

示例1: entryLedgers

 /**
  * Show the entry ledger details
  */
 function entryLedgers($id)
 {
     /* Load the Entry model */
     App::import("Webzash.Model", "Entry");
     $Entry = new Entry();
     return $Entry->entryLedgers($id);
 }
开发者ID:richardkeep,项目名称:webzash,代码行数:10,代码来源:GenericHelper.php

示例2: performHandlerTasks

 public function performHandlerTasks()
 {
     if (($author_id = Application::param('author_id')) && ($entry_id = Application::param('entry_id'))) {
         $entry = new Entry();
         $entry->clauseSafe('author_id', $author_id);
         $entry->clauseSafe('entry_id', $entry_id);
         $this->entry_to_manage_for = $entry;
     } else {
         $this->redirectOnAccessDenied();
     }
     if (!LogbookAccess::currentUserCanManageAccess($this->entryToManageFor())) {
         $this->redirectOnAccessDenied();
     }
     if ($group_id = Application::param('group_id')) {
         $this->group_to_manage_for = new Group();
         $this->group_to_manage_for->clauseSafe('group_id', $group_id);
     }
     if (Application::formPosted()) {
         if (Application::param('choose_group')) {
             $this->chooseGroup();
         }
         if (Application::param('manage_access')) {
             $this->manageAccess();
         }
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:26,代码来源:manage_group_access.class.php

示例3: indexAction

 public function indexAction()
 {
     $entries = new Entry();
     // test memcached
     if (extension_loaded('memcache')) {
         $mem = new Memcache();
         $mem->addServer('localhost', 11211);
         $result = $mem->get('indexContent');
         if (!$result) {
             $result = $entries->fetchLatest(100);
             $mem->set('indexContent', $result, 0, 4);
         }
     } else {
         $result = $entries->fetchLatest(100);
     }
     if ($result) {
         $this->view->entries = $result;
         // Zend_Paginator
         $page = $this->_request->getParam('page', 1);
         $paginator = Zend_Paginator::factory($result);
         $paginator->setItemCountPerPage(4);
         $paginator->setCurrentPageNumber($page);
         $this->view->paginator = $paginator;
     }
 }
开发者ID:kalimatas,项目名称:zbook,代码行数:25,代码来源:IndexController.php

示例4: add

 public function add(Entry $entry)
 {
     if (!$entry instanceof Entry) {
         throw InvalidArgumentException('引数の型が不正です');
     }
     $this->directory[] = $entry;
     $entry->setParent($this);
 }
开发者ID:th1209,项目名称:DesignPatternQuestions,代码行数:8,代码来源:main.php

示例5: addEntry

 public function addEntry($data, $program)
 {
     $entry = new Entry();
     $entry->fromData($data, $program);
     array_push($this->entries, $entry);
     writeLog('Loaded entry for program ' . $program->id . ' (', $program->year . ')');
     return $entry;
 }
开发者ID:redsummit,项目名称:anitaborg,代码行数:8,代码来源:User.php

示例6: postAdd

 public function postAdd($p, $z)
 {
     //	update Zoop::Form so that it it can handle consolidating the edit and view pages here
     $entry = new Entry();
     $entry->start = $_POST['start'];
     $entry->end = $_POST['end'];
     $entry->title = $_POST['title'];
     $entry->is_duration = isset($_POST['is_duration']) && $_POST['is_duration'] ? 1 : 0;
     $entry->save();
     $this->redirect('');
 }
开发者ID:laiello,项目名称:zoop,代码行数:11,代码来源:ZoneEntries.php

示例7: importEntry

 public static function importEntry($path)
 {
     $parts = explode('/', $path);
     $info = explode('_', $parts[count($parts) - 2]);
     //	do the database part
     $entry = new Entry((int) $info[0]);
     $entry->name = $info[1];
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }
开发者ID:laiello,项目名称:zoop,代码行数:12,代码来源:Content.php

示例8: getTags

 function getTags(Entry $entry)
 {
     $sql = "SELECT tags.id_tag as id, tags.tag_text\n\t\t\t\tFROM entry2tag\n\t\t\t\tINNER JOIN tags\n\t\t\t\tON entry2tag.id_tag = tags.id_tag\n\t\t\t\tWHERE entry2tag.id_entry = :id";
     try {
         $query = $this->db->prepare($sql);
         $query->execute(array(':id' => $entry->getId()));
     } catch (PDOException $e) {
         return $e->getMessage();
     }
     $tags = $query->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, "Tag");
     $entry->setTags($tags);
 }
开发者ID:ringmaster,项目名称:my.brain,代码行数:12,代码来源:entryDAO.php

示例9: importEntry

 public static function importEntry($path)
 {
     $info = self::parsePath($path);
     //	do the database part
     $entry = new Entry((int) $info['id']);
     $entry->name = $info['name'];
     $entry->simple = $info['simple'];
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }
开发者ID:rgigger,项目名称:zinc,代码行数:12,代码来源:Content.php

示例10: entry_count

 public function entry_count()
 {
     $child_class = $this->class === 'category' ? 'entry' : 'page';
     $blog_id = $this->blog_id;
     $cat_id = $this->id;
     $where = "entry_status = 2\n                  and entry_class = '{$child_class}'\n                  and entry_blog_id = {$blog_id}";
     $join = array();
     $join['mt_placement'] = array('condition' => "placement_entry_id = entry_id and placement_category_id = {$cat_id}");
     require_once 'class.mt_entry.php';
     $entry = new Entry();
     $cnt = $entry->count(array('where' => $where, 'join' => $join));
     return $cnt;
 }
开发者ID:OCMO,项目名称:movabletype,代码行数:13,代码来源:class.mt_category.php

示例11: createPayload

 /**
  * Create the view payload
  * @param \mdref\Entry $ref
  * @param \mdref\Generator\Renderer $view
  * @return \stdClass
  */
 private function createPayload(Entry $ref = null)
 {
     $pld = new \stdClass();
     $pld->quick = [$this->reference, "formatString"];
     $pld->file = [$this->reference, "formatFile"];
     $pld->refs = $this->reference;
     $pld->view = $this->renderer;
     if ($ref) {
         $pld->entry = $ref;
         $pld->ref = $ref->getName();
     }
     return $pld;
 }
开发者ID:justforleo,项目名称:mdref,代码行数:19,代码来源:Generator.php

示例12: save

 public function save()
 {
     $transaction = $this->beginTransaction();
     try {
         $entry = new Entry();
         $entry->newEntry($this->getEntry());
         parent::save();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:13,代码来源:DomainRepository.php

示例13: processData

 public function processData($data, Entry $entry = null)
 {
     $driver = Extension::load('members');
     if (isset($entry->data()->{$this->{'element-name'}})) {
         $result = $entry->data()->{$this->{'element-name'}};
     } else {
         $result = (object) array('value' => null);
     }
     if (!is_null($data)) {
         $result->value = $data;
     }
     return $result;
 }
开发者ID:brendo,项目名称:symphony-3,代码行数:13,代码来源:field.memberemail.php

示例14: importEntry

 public static function importEntry($path)
 {
     $parts = explode('/', $path);
     $dir = $parts[count($parts) - 2];
     $id = (int) substr($dir, 0, strpos($dir, '_'));
     $name = substr($dir, strpos($dir, '_') + 1);
     //	do the database part
     $entry = new Entry($id);
     $entry->name = $name;
     $entry->assignHeaders();
     $entry->save();
     //	do the file system part
     $entry->cacheContent();
 }
开发者ID:laiello,项目名称:zoop,代码行数:14,代码来源:Content.php

示例15: updateEntry

 public function updateEntry($newEntry)
 {
     $transaction = $this->beginTransaction();
     try {
         $this->setTimeLine(Base::updateTimeLine($this->getEntry(), $newEntry));
         $entry = new Entry();
         $entry->updateEntry($this->getEntry(), $newEntry);
         $this->setEntry($newEntry);
         parent::save();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:15,代码来源:CorpusRepository.php


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