phpDocumentor items
[ class tree: items ] [ index: items ] [ all elements ]

Class: ItemQuery

Source Location: /qp_inc/items/model/_itemquery.class.php

Class ItemQuery

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SQL

SQL::$from
SQL::$group_by
SQL::$limit
SQL::$order_by
SQL::$search_field
SQL::$search_field_regexp
SQL::$select
SQL::$where

Inherited From SQL

SQL::SQL()
Constructor.
SQL::add_search_field()
create array of search fields
SQL::display()
Get whole query
SQL::FROM()
SQL::FROM_add()
Extends the FROM clause.
SQL::get()
Get whole query
SQL::get_from()
Get FROM clause if there is something inside
SQL::get_group_by()
Get GROUP BY clause if there is something inside
SQL::get_limit()
Get LIMIT clause if there is something inside
SQL::get_order_by()
Get ORDER BY clause if there is something inside
SQL::get_select()
Get SELECT clause if there is something inside
SQL::get_where()
Get WHERE clause if there is something inside
SQL::GROUP_BY()
dummy docblock makes error-free autodocs
SQL::LIMIT()
dummy docblock makes error-free autodocs
SQL::ORDER_BY()
dummy docblock makes error-free autodocs
SQL::ORDER_BY_prepend()
dummy docblock makes error-free autodocs
SQL::SELECT()
Set SELECT clause
SQL::SELECT_add()
Extends the SELECT clause.
SQL::WHERE()
SQL::WHERE_and()
Extends the WHERE clause with AND
SQL::WHERE_keyword()
create the filter whith the search field array
SQL::WHERE_or()
Extends the WHERE clause with OR
SQL::WHERE_regexp()
create the filter whith the search field regexp array

[ Top ]
Property Summary
mixed   $assignees  
mixed   $author  
mixed   $blog  
mixed   $cat  
mixed   $catsel  
mixed   $dstart  
mixed   $dstop  
mixed   $exact  
mixed   $featured  
mixed   $keywords  
mixed   $p  
mixed   $phrase  
mixed   $pl  
mixed   $show_statuses  
mixed   $statuses  
mixed   $tags  
mixed   $timestamp_max  
mixed   $timestamp_min  
mixed   $title  
mixed   $types  

[ Top ]
Method Summary
ItemQuery   ItemQuery()   Constructor.
void   where_assignees()   Restrict to specific assignees
void   where_author()   Restrict to specific authors
void   where_author_assignee()   Restrict to specific assignee or author
void   where_chapter()   Restrict to specific collection/chapters (blog/categories)
void   where_chapter2()   Restrict to specific collection/chapters (blog/categories)
void   where_datecreated()   Restricts creation date to a specific date range.
void   where_datestart()   Restricts to a specific date range. (despite thje 'start' in the name
void   where_featured()   Restrict to the featured/non featured posts if requested
void   where_ID()   Restrict to a specific post
void   where_ID_list()   Restrict to a specific list of posts
void   where_keywords()   Restrict with keywords
void   where_locale()   Restrict to specific locale
void   where_statuses()   Restrict to specific (exetnded) statuses
void   where_tags()   Restrict to specific tags
void   where_types()   Restrict to specific item types
void   where_visibility()   Restrict to the visibility/sharing statuses we want to show

[ Top ]
Properties
mixed   $assignees [line 48]

[ Top ]
mixed   $author [line 47]

[ Top ]
mixed   $blog [line 42]

[ Top ]
mixed   $cat [line 43]

[ Top ]
mixed   $catsel [line 44]

[ Top ]
mixed   $dstart [line 51]

[ Top ]
mixed   $dstop [line 52]

[ Top ]
mixed   $exact [line 57]

[ Top ]
mixed   $featured [line 58]

[ Top ]
mixed   $keywords [line 55]

[ Top ]
mixed   $p [line 39]

[ Top ]
mixed   $phrase [line 56]

[ Top ]
mixed   $pl [line 40]

[ Top ]
mixed   $show_statuses [line 45]

[ Top ]
mixed   $statuses [line 49]

[ Top ]
mixed   $tags [line 46]

[ Top ]
mixed   $timestamp_max [line 54]

[ Top ]
mixed   $timestamp_min [line 53]

[ Top ]
mixed   $title [line 41]

[ Top ]
mixed   $types [line 50]

[ Top ]
Methods
Constructor ItemQuery  [line 68]

  ItemQuery ItemQuery( string $dbtablename, [string $dbprefix = ''], string $dbIDname  )

Constructor.

Parameters:
string   $dbtablename:  Name of table in database
string   $dbprefix:  Prefix of fields in the table
string   $dbIDname:  Name of the ID field (including prefix)


[ Top ]
where_assignees  [line 348]

  void where_assignees( string $assignees  )

Restrict to specific assignees

Parameters:
string   $assignees:  List of assignees to restrict to (must have been previously validated)


[ Top ]
where_author  [line 319]

  void where_author( string $author  )

Restrict to specific authors

Parameters:
string   $author:  List of authors to restrict to (must have been previously validated)


[ Top ]
where_author_assignee  [line 378]

  void where_author_assignee( integer $author_assignee  )

Restrict to specific assignee or author

Parameters:
integer   $author_assignee:  assignee or author to restrict to (must have been previously validated)


[ Top ]
where_chapter  [line 141]

  void where_chapter( integer $blog, [string $cat = ''], [array $catsel = array()]  )

Restrict to specific collection/chapters (blog/categories)

Parameters:
integer   $blog: 
string   $cat:  List of cats to restrict to
array   $catsel:  Array of cats to restrict to


[ Top ]
where_chapter2  [line 196]

  void where_chapter2( Blog &$Blog, array $cat_array, string $cat_modifier, [string $cat_focus = 'wide']  )

Restrict to specific collection/chapters (blog/categories)

Parameters:
Blog   &$Blog: 
array   $cat_array: 
string   $cat_modifier: 
string   $cat_focus:  'wide' to search in extra cats too, 'main' for main cat only


[ Top ]
where_datecreated  [line 632]

  void where_datecreated( [mixed $timestamp_created_max = 'now']  )

Restricts creation date to a specific date range.

Parameters:
mixed   $timestamp_created_max:  Do not show posts CREATED after this timestamp


[ Top ]
where_datestart  [line 487]

  void where_datestart( [string $m = ''], [integer $w = ''], [string $dstart = ''], [string $dstop = ''], [mixed $timestamp_min = ''], [mixed $timestamp_max = 'now']  )

Restricts to a specific date range. (despite thje 'start' in the name

Priorities: -dstart and/or dstop -week + m -m

Parameters:
string   $m:  YYYYMMDDHHMMSS (everything after YYYY is optional) or ''
integer   $w:  week number or ''
string   $dstart:  YYYYMMDDHHMMSS to start at, '' for first available
string   $dstop:  YYYYMMDDHHMMSS to stop at
mixed   $timestamp_min:  Do not show posts before this timestamp, can be 'now'
mixed   $timestamp_max:  Do not show posts after this timestamp, can be 'now'

API Tags:
See:  ItemList2::get_advertised_start_date()

Information Tags:
Todo:  -dstart + x days

[ Top ]
where_featured  [line 272]

  void where_featured( [boolean|NULL $featured = NULL]  )

Restrict to the featured/non featured posts if requested

Parameters:
boolean|NULL   $featured:  Restrict to featured


[ Top ]
where_ID  [line 81]

  void where_ID( [ $p = ''], [ $title = '']  )

Restrict to a specific post

Parameters:
   $p: 
   $title: 


[ Top ]
where_ID_list  [line 110]

  void where_ID_list( [ $pl = '']  )

Restrict to a specific list of posts

Parameters:
   $pl: 


[ Top ]
where_keywords  [line 652]

  void where_keywords( string $keywords, mixed $phrase, mixed $exact  )

Restrict with keywords

Parameters:
string   $keywords:  Keyword search string
mixed   $phrase:  Search for entire phrase or for individual words
mixed   $exact:  Require exact match of title or contents


[ Top ]
where_locale  [line 397]

  void where_locale( string $locale  )

Restrict to specific locale

Parameters:
string   $locale:  locale to restrict to ('all' if you don't want to restrict)


[ Top ]
where_statuses  [line 415]

  void where_statuses( string $statuses  )

Restrict to specific (exetnded) statuses

Parameters:
string   $statuses:  List of assignees to restrict to (must have been previously validated)


[ Top ]
where_tags  [line 296]

  void where_tags( string $tags  )

Restrict to specific tags

Parameters:
string   $tags:  List of tags to restrict to


[ Top ]
where_types  [line 445]

  void where_types( string $types  )

Restrict to specific item types

Parameters:
string   $types:  List of types to restrict to (must have been previously validated)


[ Top ]
where_visibility  [line 254]

  void where_visibility( array $show_statuses  )

Restrict to the visibility/sharing statuses we want to show

Parameters:
array   $show_statuses:  Restrict to these statuses


[ Top ]