• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Entry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: sdkLoader

 public function sdkLoader()
 {
     // Variables
     $category = [];
     $cart = [];
     unset($_SESSION);
     // Load the SDK
     $moltin = new \Moltin\SDK\SDK(new \Moltin\SDK\Storage\Session(), new \Moltin\SDK\Request\CURL(), ['url' => isset($this->config['moltin_api_url']) ? $this->config['moltin_api_url'] : null, 'auth_url' => isset($this->config['moltin_api_auth_url']) ? $this->config['moltin_api_auth_url'] : null, 'version' => isset($this->config['moltin_api_version']) ? $this->config['moltin_api_version'] : null]);
     \Moltin::Authenticate('ClientCredentials', ['client_id' => $this->config['api_client_id'], 'client_secret' => $this->config['api_client_secret']]);
     try {
         // Get categories
         $categories = \Category::Tree(['status' => 1]);
     } catch (\Exception $e) {
         exit($e->getMessage());
     }
     try {
         // Get cart contents
         $cart = \Cart::Contents()['result'];
     } catch (\Exception $e) {
         exit($e->getMessage());
     }
     try {
         // Get pages
         $pages = \Entry::Find('page', ['status' => 1])['result'];
     } catch (\Exception $e) {
         exit($e->getMessage());
     }
     // add cart to app - so it can be accessed in controllers
     $this->app->cart = $cart;
     // Assign to view
     $this->app->view()->appendData(['categories' => $categories['result'], 'cart' => $cart]);
 }
开发者ID:beyondusability,项目名称:moltin-framework,代码行数:32,代码来源:Moltin.php


示例17: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $x = 1;
     foreach (Group::all() as $group) {
         $contents = Content::where('group_id', $group->getKey())->count();
         $entries = Entry::where('group_id', $group->getKey())->count();
         $total = $contents + $entries;
         // Default activity is medium = 2
         $group->activity = 2;
         // Low activity, when nothing was added last week
         if ($total == 0) {
             $group->activity = 1;
         }
         if ($total > 15) {
             $group->activity = 3;
         }
         if ($total > 50) {
             $group->activity = 4;
         }
         $group->save();
         if (!($x % 100)) {
             $this->info($x . ' groups processed');
         }
         $x++;
     }
     $this->info('All groups processed');
 }
开发者ID:vegax87,项目名称:Strimoid,代码行数:32,代码来源:GroupActivity.php


示例18: __construct

 /**
  * The MarkdownGenerator constructor.
  *
  * @constructor
  * @param {string} $source The source code to parse.
  * @param {Array} $options The options array.
  */
 public function __construct($source, $options = array())
 {
     // juggle arguments
     if (is_array($source)) {
         $options = $source;
     } else {
         $options['source'] = $source;
     }
     if (isset($options['source']) && realpath($options['source'])) {
         $options['path'] = $options['source'];
     }
     if (isset($options['path'])) {
         preg_match('/(?<=\\.)[a-z]+$/', $options['path'], $ext);
         $options['source'] = file_get_contents($options['path']);
         $ext = array_pop($ext);
         if (!isset($options['lang']) && $ext) {
             $options['lang'] = $ext;
         }
         if (!isset($options['title'])) {
             $options['title'] = ucfirst(basename($options['path'])) . ' API documentation';
         }
     }
     if (!isset($options['lang'])) {
         $options['lang'] = 'js';
     }
     if (!isset($options['toc'])) {
         $options['toc'] = 'properties';
     }
     $this->options = $options;
     $this->source = str_replace(PHP_EOL, "\n", $options['source']);
     $this->entries = Entry::getEntries($this->source);
     foreach ($this->entries as $index => $value) {
         $this->entries[$index] = new Entry($value, $this->source, $options['lang']);
     }
 }
开发者ID:npup,项目名称:lodash,代码行数:42,代码来源:MarkdownGenerator.php


示例19: add_entry_or_merge

 function add_entry_or_merge($entry)
 {
     if (is_array($entry)) {
         $entry = new Entry($entry);
     }
     $key = $entry->key();
     if (FALSE === $key) {
         return FALSE;
     }
     if (isset($this->entries[$key])) {
         $this->entries[$key]->merge_with($entry);
     } else {
         $this->entries[$key] =& $entry;
     }
     return TRUE;
 }
开发者ID:NaszvadiG,项目名称:codeigniter-extended,代码行数:16,代码来源:Base.php


示例20: run

 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Entry::create([]);
     }
 }
开发者ID:JustinMackenzie,项目名称:meal-log,代码行数:7,代码来源:EntriesTableSeeder.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP EntryManager类代码示例发布时间:2022-05-23
下一篇:
PHP Entrust类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap