/** * Returns an instance of class (singleton pattern implementation). * * @return BOL_AttachmentDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
$QUESTION_PRESENTATION_MULTICHECKBOX = BOL_QuestionService::QUESTION_PRESENTATION_MULTICHECKBOX; $QUESTION_PRESENTATION_URL = BOL_QuestionService::QUESTION_PRESENTATION_URL; $QUESTION_PRESENTATION_TEXT = BOL_QuestionService::QUESTION_PRESENTATION_TEXT; $QUESTION_PRESENTATION_TEXTAREA = BOL_QuestionService::QUESTION_PRESENTATION_TEXTAREA; $MYSQL_DATETIME_DATE_FORMAT = UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT; $USER_LIST_SIZE = BOL_SearchService::USER_LIST_SIZE; $SEARCH_RESULT_ID_VARIABLE = BOL_SearchService::SEARCH_RESULT_ID_VARIABLE; $PARAM_OPTION_DEFAULT_VALUE = OW_Route::PARAM_OPTION_DEFAULT_VALUE; $LIST_ORDER_MATCH_COMPATIBILITY = USEARCH_BOL_Service::LIST_ORDER_MATCH_COMPATIBILITY; $LIST_ORDER_DISTANCE = USEARCH_BOL_Service::LIST_ORDER_DISTANCE; $LIST_ORDER_LATEST_ACTIVITY = USEARCH_BOL_Service::LIST_ORDER_LATEST_ACTIVITY; $LIST_ORDER_NEW = USEARCH_BOL_Service::LIST_ORDER_NEW; $HAMMU_BOL_Service = HAMMU_BOL_Service::getInstance(); $language = OW::getLanguage(); $OWgetDbo = OW::getDbo(); $SKADATE_BOL_AccountTypeToGenderDao = SKADATE_BOL_AccountTypeToGenderDao::getInstance(); // // //$getClassInstance = OW::getClassInstance('USEARCH_CLASS_QuickSearchForm'); //$formatBirthdate = UTIL_DateTime::formatBirthdate; //$autoLink = UTIL_HtmlTag::autoLink; //$parseDate = UTIL_DateTime::parseDate; // POST route //$app->post('/loginapp', 'loginapp'); //$app->post('/loginapp', 'loginapp'); $app->post('/login', 'login'); $app->post('/forgot_password', 'forgot_password'); $app->post('/getAllServices', 'getAllServices'); $app->post('/getAllServicesOrPreferences', 'getAllServicesOrPreferences'); $app->post('/getProfiledetails', 'getProfiledetails'); $app->post('/listing', 'listing');
/** * Constructor. */ private function __construct() { $this->accountTypeToGenderDao = SKADATE_BOL_AccountTypeToGenderDao::getInstance(); $this->cache = array(); }
public function findMatchQuestionsForUser($userId) { if ($userId === null) { return array(); } if (!OW::getPluginManager()->isPluginActive('skadate')) { return array(); } $genderAccTypes = SKADATE_BOL_AccountTypeToGenderService::getInstance()->findAll(); $lookingForValue = BOL_QuestionService::getInstance()->getQuestionData(array($userId), array('match_sex')); $lookingForValues = array(); foreach ($genderAccTypes as $type) { if ($lookingForValue[$userId]['match_sex'] & $type->genderValue) { $lookingForValues[] = $type->genderValue; } } if (empty($lookingForValues)) { return array(); } $lookingForValues = $this->dbo->mergeInClause($lookingForValues); $sql = " SELECT DISTINCT `question`.* FROM `" . BOL_QuestionDao::getInstance()->getTableName() . "` as `question`\n\n LEFT JOIN `" . BOL_QuestionSectionDao::getInstance()->getTableName() . "` as `section`\n ON ( `question`.`sectionName` = `section`.`name` AND `question`.`sectionName` != '' AND `question`.`sectionName` IS NOT NULL )\n\n LEFT JOIN " . BOL_QuestionToAccountTypeDao::getInstance()->getTableName() . " as `qta` ON ( `question`.`parent` = `qta`.`questionName` )\n\n LEFT JOIN `" . SKADATE_BOL_AccountTypeToGenderDao::getInstance()->getTableName() . "` as `atg` ON (`qta`.`accountType` = `atg`.`accountType`)\n\n WHERE `question`.`sectionName`='about_my_match' AND `atg`.`genderValue` IN ( {$lookingForValues} )\n\n ORDER BY IF( `section`.`name` IS NULL, 0, 1 ), `section`.`sortOrder`, `question`.`sortOrder` "; return $this->dbo->queryForList($sql); }