Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-02-21-30-06
[civicrm-core.git] / CRM / Contact / Form / Search / Interface.php
index 92cf44aba233bffcf8aacf65dbb50c88db70d3d0..110503443011f2ead579b2ad8042c85aefe6c58a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
 interface CRM_Contact_Form_Search_Interface {
 
   /**
-   * The constructor gets the submitted form values
+   * The constructor gets the submitted form values.
+   *
+   * @param array $formValues
+   */
+  public function __construct(&$formValues);
+
+  /**
+   * Builds the list of tasks or actions that a searcher can perform on a result set.
+   *
+   * @param CRM_Core_Form_Search $form
+   * @return array
    */
-  function __construct(&$formValues);
+  // @todo: This interface change should not go into a minor version; save for 4.6
+  // public function buildTaskList(CRM_Core_Form_Search $form);
 
   /**
    * Builds the quickform for this search
    */
-  function buildForm(&$form);
+  public function buildForm(&$form);
 
   /**
    * Builds the search query for various cases. We break it down into finer cases
@@ -52,29 +63,43 @@ interface CRM_Contact_Form_Search_Interface {
    */
 
   /**
-   * Count of records that match the current input parameters
-   * Used by pager
+   * Count of records that match the current input parameters.
+   *
+   * Used by pager.
    */
-  function count();
+  public function count();
 
   /**
-   * Summary information for the query that can be displayed in the template
+   * Summary information for the query that can be displayed in the template.
+   *
    * This is useful to pass total / sub total information if needed
    */
-  function summary();
+  public function summary();
 
   /**
-   * List of contact ids that match the current input parameters
+   * List of contact ids that match the current input parameters.
+   *
    * Used by different tasks. Will be also used to optimize the
    * 'all' query below to avoid excessive LEFT JOIN blowup
+   *
+   * @param int $offset
+   * @param int $rowcount
+   * @param null $sort
    */
-  function contactIDs($offset = 0, $rowcount = 0, $sort = NULL);
+  public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL);
 
   /**
-   * Retrieve all the values that match the current input parameters
+   * Retrieve all the values that match the current input parameters.
+   *
    * Used by the selector
+   *
+   * @param int $offset
+   * @param int $rowcount
+   * @param null $sort
+   * @param bool $includeContactIDs
+   * @param bool $justIDs
    */
-  function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE);
+  public function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE);
 
   /**
    * The below two functions (from and where) are ONLY used if you want to
@@ -83,27 +108,28 @@ interface CRM_Contact_Form_Search_Interface {
    * The from clause should be a valid sql from clause including the word FROM
    * CiviMail will pick up the contacts where the email is primary and
    * is not on hold / opt out / do not email
-   *
    */
 
   /**
-   * The from clause for the query
+   * The from clause for the query.
    */
-  function from();
+  public function from();
 
   /**
-   * The where clause for the query
+   * The where clause for the query.
+   *
+   * @param bool $includeContactIDs
    */
-  function where($includeContactIDs = FALSE);
+  public function where($includeContactIDs = FALSE);
 
   /**
-   * The template FileName to use to display the results
+   * The template FileName to use to display the results.
    */
-  function templateFile();
+  public function templateFile();
 
   /**
-   * Returns an array of column headers and field names and sort options
+   * Returns an array of column headers and field names and sort options.
    */
-  function &columns();
-}
+  public function &columns();
 
+}