コード例 #1
0
ファイル: Subscription.php プロジェクト: nagyist/Tattle
 /**
  * Creates all Check related URLs for the site
  * 
  * @param  string $type  The type of URL to make: 'list', 'add', 'edit', 'delete'
  * @param  Meetup $obj   The Check object for the edit and delete URL types
  * @return string  The URL requested
  */
 public static function makeURL($type, $obj = NULL)
 {
     switch ($type) {
         case 'list':
             return 'subscription.php';
         case 'add':
             return 'subscription.php?action=add&check_id=' . (int) $obj->getCheckId();
         case 'edit':
             return 'subscription.php?action=edit&subscription_id=' . (int) $obj->getSubscriptionId();
         case 'delete':
             return 'subscription.php?action=delete&subscription_id=' . (int) $obj->getSubscriptionId();
     }
 }