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


PHP DataMapper::get方法代码示例

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


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

示例1: get

 function get()
 {
     parent::get();
     if ($this->username == null) {
         throw new UserNotFound();
     }
 }
开发者ID:rezachess,项目名称:Planning,代码行数:7,代码来源:user.php

示例2: __construct

 public function __construct()
 {
     foreach ($this->objects as $map) {
         $this->{strtolower($map . 'mapper')} = DataMapper::get($map);
     }
     $this->template = new Templater();
 }
开发者ID:erkie,项目名称:cowl,代码行数:7,代码来源:command.php

示例3: get

 /**
  * Overwrite of the get() function to add filters to the search.
  * Refer to DataMapper ORM for get() function details.
  *
  * @author	Woxxy
  * @param	integer|NULL $limit Limit the number of results.
  * @param	integer|NULL $offset Offset the results when limiting.
  * @return	DataMapper Returns self for method chaining.
  */
 public function get($limit = NULL, $offset = NULL)
 {
     // Get the CodeIgniter instance, since it isn't set in this file.
     $CI =& get_instance();
     // Check if the user is allowed to see protected chapters.
     if (!$CI->tank_auth->is_allowed()) {
         $this->where('hidden', 0);
     }
     $result = parent::get($limit, $offset);
     $this->get_licenses();
     $CI =& get_instance();
     if (!$CI->tank_auth->is_allowed() && !$CI->tank_auth->is_team()) {
         // Remove from the array the serie licensed in the user's nation
         foreach ($this->all as $key => $item) {
             if (in_array($CI->session->userdata('nation'), $this->licenses)) {
                 unset($this->all[$key]);
             }
         }
         if (in_array($CI->session->userdata('nation'), $this->licenses)) {
             $this->clear();
         }
     }
     // let's put the result in a small cache, since teams are always the same
     foreach ($this->all as $comic) {
         // if it's not yet cached, let's cache it
         if (!$this->get_cached($comic->id)) {
             if (count(self::$cached) > 10) {
                 array_shift(self::$cached);
             }
             self::$cached[] = $comic->get_clone();
         }
     }
     return $result;
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:43,代码来源:comic.php

示例4: get

 public function get()
 {
     parent::get();
     if ($this->name == null) {
         throw new Task_Not_Found();
     }
 }
开发者ID:rezachess,项目名称:Planning,代码行数:7,代码来源:task.php

示例5: __construct

 public function __construct($id = null)
 {
     if (!is_null($id)) {
         $this->setID($id);
     }
     $this->validator = new Validator();
     $this->validator->setStoreErrors(true);
     $this->mapper = DataMapper::get(get_class($this));
 }
开发者ID:erkie,项目名称:cowl,代码行数:9,代码来源:domainobject.php

示例6: get

 /**
  * Overwrite of the get() function to add filters to the search.
  * Refer to DataMapper ORM for get() function details.
  *
  * @author	Woxxy
  * @param	integer|NULL $limit Limit the number of results.
  * @param	integer|NULL $offset Offset the results when limiting.
  * @return	DataMapper Returns self for method chaining.
  */
 public function get($limit = NULL, $offset = NULL)
 {
     // Get the CodeIgniter instance, since it isn't set in this file.
     $CI =& get_instance();
     // Check if the user is allowed to see protected chapters.
     if (!$CI->tank_auth->is_allowed()) {
         $this->where('hidden', 0);
     }
     return parent::get($limit, $offset);
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:19,代码来源:page.php

示例7: get

 /**
  * Overwrite of the get() function to add filters to the search.
  * Refer to DataMapper ORM for get() function details.
  *
  * @author	Woxxy
  * @param	integer|NULL $limit Limit the number of results.
  * @param	integer|NULL $offset Offset the results when limiting.
  * @return	DataMapper Returns self for method chaining.
  */
 public function get($limit = NULL, $offset = NULL)
 {
     // Get the CodeIgniter instance, since it isn't set in this file.
     $CI =& get_instance();
     // Check if the user is allowed to see protected chapters.
     if (!$CI->tank_auth->is_allowed()) {
         $this->where('hidden', 0);
     }
     $result = parent::get($limit, $offset);
     foreach ($this->all as $key => $item) {
         if (!$item->get_comic()) {
             unset($this->all[$key]);
         }
     }
     return $result;
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:25,代码来源:chapter.php

示例8: get

 /**
  * Overwrite of the get() function to add filters to the search.
  * Refer to DataMapper ORM for get() function details.
  *
  * @author	Woxxy
  * @param	integer|NULL $limit Limit the number of results.
  * @param	integer|NULL $offset Offset the results when limiting.
  * @return	DataMapper Returns self for method chaining.
  */
 public function get($limit = NULL, $offset = NULL)
 {
     $result = parent::get($limit, $offset);
     // let's put the result in a small cache, since teams are always the same
     if ($this->result_count() > 0) {
         foreach ($this->all as $team) {
             // if it's not yet cached, let's cache it
             if (!$this->get_cached($team->id)) {
                 if (count(self::$cached) > 10) {
                     array_shift(self::$cached);
                 }
                 self::$cached[] = $team->get_clone();
             }
         }
     }
     return $result;
 }
开发者ID:KasaiDot,项目名称:FoOlSlide,代码行数:26,代码来源:team.php

示例9: get

	/**
	 * Overwrite of the get() function to add filters to the search.
	 * Refer to DataMapper ORM for get() function details.
	 *
	 * @author	Woxxy
	 * @param	integer|NULL $limit Limit the number of results.
	 * @param	integer|NULL $offset Offset the results when limiting.
	 * @return	DataMapper Returns self for method chaining.
	 */
	public function get($limit = NULL, $offset = NULL) {
		// Get the CodeIgniter instance, since it isn't set in this file.
		$CI = & get_instance();

		// Check if the user is allowed to see protected chapters.
		if (!$CI->tank_auth->is_allowed()) {
			$this->where('hidden', 0);
		}

		$result = parent::get($limit, $offset);

		$this->get_licenses();

		$CI = & get_instance();

		if (!$CI->tank_auth->is_allowed() && !$CI->tank_auth->is_team()) {
		// Remove from the array the comics licensed in the user's nation
			foreach ($this->all as $key => $item) {
				if (in_array($CI->session->userdata('nation'), $this->licenses)) {
					unset($this->all[$key]);
				}
			}
			if (in_array($CI->session->userdata('nation'), $this->licenses)) {
				$this->clear();
			}
		}
			

		return $result;
	}
开发者ID:Nakei,项目名称:FoOlSlide,代码行数:39,代码来源:comic.php

示例10: get

 /**
  * Get (overload)
  *
  * Get objects.
  *
  * @access	public
  * @param	int or array
  * @return	bool
  */
 function get($limit = NULL, $offset = NULL)
 {
     $this->_prepare_for_query();
     return parent::get($limit, $offset);
 }
开发者ID:brenden,项目名称:Ignited-Blog,代码行数:14,代码来源:employee.php

示例11: get

 public function get($limit = NULL, $offset = NULL)
 {
     // reset changed relation
     if (!empty($this->parent)) {
         if (array_key_exists('object', $this->parent) && array_key_exists('this_field', $this->parent)) {
             $object = $this->parent['object'];
             $this_field = $this->parent['this_field'];
             if (array_key_exists($this_field, $object->original_related_values)) {
                 unset($object->original_related_values[$this_field]);
             }
             if (array_key_exists($this_field, $object->changed_related_values)) {
                 unset($object->changed_related_values[$this_field]);
             }
         }
     }
     return parent::get($limit, $offset);
 }
开发者ID:mehulsbhatt,项目名称:MDIgniter,代码行数:17,代码来源:mdi_model.php

示例12: get

 public function get()
 {
     $return = parent::get();
     $this->checkForAchieveOrNot();
     $this->_setDoneTime();
     return $return;
 }
开发者ID:rezachess,项目名称:Planning,代码行数:7,代码来源:goal.php

示例13:

 function get_deteted($limit = NULL, $offset = NULL)
 {
     $this->where('status', STATUS_DELETED);
     parent::get($limit, $offset);
 }
开发者ID:thomasgroch,项目名称:quiz,代码行数:5,代码来源:datamapperext.php

示例14: get_slim

 public function get_slim($limit = NULL, $offset = NULL)
 {
     return parent::get($limit, $offset);
 }
开发者ID:RCMmedia,项目名称:rubicon,代码行数:4,代码来源:MY_Model.php


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