コード例 #1
0
    /**
     * @param String $campaignId
     * @return NULL|Pap_Common_Campaign
     */
    public static function getCampaignById($campaignId) {
        if($campaignId == '') {
            return null;
        }

        $campaign = new Pap_Common_Campaign();
        $campaign->setPrimaryKeyValue($campaignId);
        try {
            $campaign->load();
        } catch (Gpf_DbEngine_NoRowException $e) {
            return null;
        }
        return $campaign;
    }