public static function getServicePath($serviceFile, $currentVersion = KC_CART_VERSION) { //v3.X v3.1.X v.3.1.3 if ($currentVersion < '1.5') { $version = '1.5.0-'; } else { if ($currentVersion >= '1.5.3') { $version = '1.5.3+'; } else { $version = '1.5+'; } } $filePath = KANCART_ROOT . '/services/v' . $version . '/' . $serviceFile; if (kc_file_exists($filePath)) { return $filePath; } return false; }
public static function actionExists($requestMethod) { return kc_file_exists(self::getActionPath($requestMethod)); }