/**
  * Gets a reference to the service singleton
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
<?php

require_once "includes/nerdery/net.theirvins.nerdery.Application.php";
require_once "includes/global_functions.php";
require_once 'includes/cp.php';
require_once "includes/framework_functions.php";
require_once 'includes/form_functions.php';
require_once "includes/nerdery/net.theirvins.nerdery.services.ListService.php";
ob_start();
// Set up session handling
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
session_start();
// get a reference to the application object
$application =& Application::getInstance();
// get a reference to the list service
$listService = ListService::getInstance();
// Check for login
checkSession();
// set up vars for current list view
$filter_date = 1;
if (isset($_POST["filterDate"])) {
    $filter_date = $_POST["filterDate"];
}
$page_action = "";
if (isset($_POST["paction"])) {
    $page_action = $_POST["paction"];
}
$errMsg = "";
$ltitle_in = "";
$ldesc_in = "";
$ltype_in = 1;
 /**
  * Get contact that belong to a specific list
  * @param string $accessToken - Constant Contact OAuth2 access token
  * @param mixed $list - Id of the list or a ContactList object
  * @param mixed $param - denotes the number of results per set, limited to 50, or a next parameter provided
  * from a previous getContactsFromList call
  * @return array
  * @throws IllegalArgumentException - if a ContactList object or id is not passed
  */
 public function getContactsFromList($accessToken, $list, $param = null)
 {
     $listId = $this->getArgumentId($list, 'ContactList');
     $param = $this->determineParam($param);
     return $this->listService->getContactsFromList($accessToken, $listId, $param);
 }