本文整理汇总了PHP中Presenter::getDataByUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::getDataByUserId方法的具体用法?PHP Presenter::getDataByUserId怎么用?PHP Presenter::getDataByUserId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Presenter
的用法示例。
在下文中一共展示了Presenter::getDataByUserId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllUserData
//.........这里部分代码省略.........
* redemption_reference_id
* redemption_amount
* expiration_date
* available
* meta - see _getMeta for structure
*
* @param int $user_id
* @param bool $include_meta_data
* @return \stdClass
*/
public function getAllUserData($user_id, $include_meta_data = TRUE)
{
require_once APPLICATION_PATH . MODEL_DIR . '/User.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Email.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Phone.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Address.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Address_geocode.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Market.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Product_credits.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Order.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Party.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Coupon_presenter_user.php';
require_once APPLICATION_PATH . MODEL_DIR . '/User_oauth2.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Accomplishments.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_documents.php';
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_us_tax_data.php';
$results = new stdClass();
//user table
$user = new User();
$results->user = $user->getDataById($user_id);
//presenter
$presenter = new Presenter();
$results->presenter = $presenter->getDataByUserId($user_id, TRUE);
if (!empty($results->presenter)) {
//compliance info
$results->presenter->compliance = $presenter->getComplianceDataByUserId($user_id, $results->presenter->market_id);
//presenter_site
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_site.php';
$presenter_site = new Presenter_site();
$results->presenter_site = $presenter_site->getDataByPresenterId($results->presenter->id);
//presenter_us_tax_data
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_us_tax_data.php';
$results->presenter_us_tax_data = $presenter->getBusinessDataByPresenterId($results->presenter->id);
//get presenter status
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_type.php';
$presenter_type = new Presenter_type();
$results->presenter->status_level_id = $presenter_type->getMaxType($results->presenter->id);
$results->presenter->status_level_name = $presenter_type->getPresenterStatusName($results->presenter->status_level_id);
//get sponsor data
$sponsor = new Presenter();
$results->presenter->sponsor = $sponsor->getSponsorData($results->presenter->sponsor_id);
//presenter info
$results->presenter_info = new stdClass();
$sign_up_date = new DateTime($results->presenter->consent_to_agreements);
//to get the right end date for fast start, we ned to check if they are in a new market that had a 1 month
//delay between sign up and sales
$fast_start_end_date = YouniqueAPI::call("presenter/getFastStartDeadline/" . $results->presenter->presenter_sequence_id);
$results->presenter_info->fast_start_end_date = date("M d, Y", strtotime($fast_start_end_date));
$presenter_documents = new Presenter_documents();
$results->presenter_documents = $presenter_documents->getPresenterDocuments($results->presenter->presenter_sequence_id);
}
//these have multiple records potentially, so we load them on their own
//emails
$email = new Email();
$results->email = $email->getDataByUserId($user_id);