Example #1
0
 /**
  * Fetch an object by it's id or slug
  *
  * Auto-detects whether to use the ID or slug as the selector when fetching
  * an object. Note that this method uses is_numeric() to determine whether
  * an ID or a slug has been passed, thus numeric slugs (which are against
  * Nails style guidelines) will be interpreted incorrectly.
  *
  * @access public
  * @param mixed $id_slug The ID or slug of the object to fetch
  * @param mixed $data Any data to pass to _getcount_common()
  * @return stdClass
  **/
 public function get_by_id_or_slug($id, $data = NULL)
 {
     $data = $this->_include_everything($data);
     return parent::get_by_id($id, $data);
 }