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


PHP Entry::Load方法代码示例

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


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

示例1: testIssetWithOverloading

 public function testIssetWithOverloading()
 {
     include_once "php/mt.php";
     include_once "php/lib/MTUtil.php";
     $cfg_file = realpath("t/mysql-test.cfg");
     $mt = MT::get_instance(1, $cfg_file);
     $ctx =& $mt->context();
     // Test some objects inheriting ObjectBase class.
     require_once "php/lib/class.mt_config.php";
     $config = new Config();
     $config->Load();
     $this->assertTrue(isset($config->id));
     require_once "php/lib/class.mt_author.php";
     $author = new Author();
     $author->Load();
     $this->assertTrue(isset($author->id));
     // protected variable call (bugid:113105)
     require_once "php/lib/class.mt_entry.php";
     $entry = new Entry();
     $entry->Load();
     $this->assertTrue(isset($entry->id));
     $this->assertNull($entry->_prefix);
     $this->assertFalse(isset($entry->_prefix));
 }
开发者ID:nanosyan,项目名称:movabletype,代码行数:24,代码来源:BaseObjectTest.php

示例2: entry_ping_count

 public function entry_ping_count($entry_id)
 {
     if (isset($this->_ping_count_cache[$entry_id])) {
         return $this->_ping_count_cache[$entry_id];
     }
     require_once 'class.mt_entry.php';
     $entry = new Entry();
     $loaded = $entry->Load("entry_id = {$entry_id}");
     $count = 0;
     if ($loaded) {
         $count = $entry->entry_ping_count;
         $this->_ping_count_cache[$entry_id] = $count;
     }
     return $count;
 }
开发者ID:OCMO,项目名称:movabletype,代码行数:15,代码来源:mtdb.base.php

示例3: entry

 public function entry()
 {
     $col_name = $this->_prefix . "entry_id";
     $entry = null;
     if (isset($this->{$col_name}) && is_numeric($this->{$col_name}) && $this->{$col_name} > 0) {
         $entry_id = $this->{$col_name};
         $entry = $this->load_cache($this->_prefix . ":" . $this->id . ":entry:" . $entry_id);
         if (empty($entry)) {
             require_once 'class.mt_entry.php';
             $entry = new Entry();
             $entry->Load("entry_id = {$entry_id}");
             $this->cache($this->_prefix . ":" . $this->id . ":entry:" . $entry->id, $entry);
         }
     }
     return $entry;
 }
开发者ID:benvanstaveren,项目名称:movabletype,代码行数:16,代码来源:class.baseobject.php


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