本文整理汇总了PHP中Package::getAppId方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::getAppId方法的具体用法?PHP Package::getAppId怎么用?PHP Package::getAppId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::getAppId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Logging
public static function Logging(User $user, Package $pkg, mfwUserAgent $ua, $con = null)
{
$now = date('Y-m-d H:i:s');
$sql = 'INSERT INTO install_log' . ' (app_id,package_id,mail,user_agent,installed)' . ' VALUES (:app_id,:package_id,:mail,:user_agent,:installed)';
$bind = array(':app_id' => $pkg->getAppId(), ':package_id' => $pkg->getId(), ':mail' => $user->getMail(), ':user_agent' => $ua->getString(), ':installed' => $now);
mfwDBIBase::query($sql, $bind, $con);
$sql = 'INSERT INTO app_install_user (app_id,mail,last_installed) VALUES (:app_id,:mail,:last_installed) ON DUPLICATE KEY UPDATE last_installed=:last_installed';
$bind = array(':app_id' => $pkg->getAppId(), ':mail' => $user->getMail(), ':last_installed' => $now);
mfwDBIBase::query($sql, $bind, $con);
}
示例2: makePackageArray
protected function makePackageArray(Package $pkg)
{
$tags = array();
foreach ($pkg->getTags() as $t) {
$tags[] = $t->getName();
}
return array('package_url' => mfwRequest::makeUrl("/package?id={$pkg->getId()}"), 'application_url' => mfwRequest::makeUrl("/app?id={$pkg->getAppId()}"), 'id' => $pkg->getId(), 'platform' => $pkg->getPlatform(), 'title' => $pkg->getTitle(), 'description' => $pkg->getDescription(), 'ios_identifier' => $pkg->getIOSIdentifier(), 'original_file_name' => $pkg->getOriginalFileName(), 'file_size' => $pkg->getFileSize(), 'created' => $pkg->getCreated(), 'tags' => $tags, 'install_count' => $pkg->getInstallCount());
}
示例3: getPackageInstalledDate
public function getPackageInstalledDate(Package $pkg, $format = null)
{
$appid = $pkg->getAppId();
if (!isset($this->pkg_install_dates[$appid])) {
$this->pkg_install_dates[$appid] = InstallLog::packageInstalledDates($this, $appid);
}
if (!isset($this->pkg_install_dates[$appid][$pkg->getId()])) {
return null;
}
$date = $this->pkg_install_dates[$appid][$pkg->getId()];
if ($format) {
$date = date($format, strtotime($date));
}
return $date;
}