UNICORN - server side
静的公開メンバ関数 | 全メンバ一覧
GenericUtilities クラス

静的公開メンバ関数

static now ($argTimezone=NULL)
 
static gmnow ()
 
static date ($argFormat, $argDate=NULL, $argBeforeTimezone=NULL, $argAfterTimezone=NULL)
 
static modifyDate ($argModify, $argFormat, $argDate=NULL, $argBeforeTimezone=NULL, $argAfterTimezone=NULL)
 
static checkDate ($argDate)
 
static checkDateFormat ($argDate, $argFormat)
 
static getStarSign ($argFormat=2, $argDate=NULL, $argBeforeTimezone=NULL, $argAfterTimezone=NULL)
 
static getBacktraceExceptionLine ()
 
static doHexEncryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static doHexDecryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static do64EncryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static do64DecryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static encryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static decryptAES ($argValue, $argKey, $argIV=null, $argPrefix= '', $argSuffix= '')
 
static getRequestURL ()
 
static getURIParams ($argStartPoint=NULL)
 
static getRequestExtension ()
 
static lowerArrKeys ($argument)
 
static setRedirectHeader ($argRedirectURL)
 
static isMobileCrawler ()
 
static convertToWareki ($year, $month, $day)
 

詳解

関数群

著者
saimushi

関数詳解

static GenericUtilities::checkDate (   $argDate)
static

有効な日付かどうかを評価する checkdateを拡張し、dateが解釈出来る全フォーマットに対応

static GenericUtilities::checkDateFormat (   $argDate,
  $argFormat 
)
static

2038年問題対応用のdate関数互換メソッド 日付の妥当性と一緒に指定されたフォーマットとデータが一致するかどうか評価する あとDatetimeクラスが解釈出来る書式ならなんでもチェック出来るようにした

static GenericUtilities::convertToWareki (   $year,
  $month,
  $day 
)
static

西暦の年月日を和暦の年月日に変換する

(例)1986 11 16→昭和61年11月16日

引数
int$year西暦の年
int$month
int$day
戻り値
string 和暦の年月日 妥当でない年月日、または明治より古い年号に該当する場合はfalse
static GenericUtilities::date (   $argFormat,
  $argDate = NULL,
  $argBeforeTimezone = NULL,
  $argAfterTimezone = NULL 
)
static

2038年問題対応用のdate関数互換メソッド

static GenericUtilities::decryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

AES暗号形式で暗号化されたデータを複号化する

引数
$argValueデコードする値
$argKey暗号キー
$argIvIV
戻り値
$encrypt 複号化データ
static GenericUtilities::do64DecryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

base64decodeしてかっらAES暗号形式のデータを複合化する

引数
stringデコードする文字列
string暗号キー
base64IV
戻り値
string 複合データ
static GenericUtilities::do64EncryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

AES暗号形式でデータを暗号化し、base64encodeする

引数
stringエンコードする文字列
string暗号キー
base64IV
戻り値
string base64encodeされt暗号データ
static GenericUtilities::doHexDecryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

base64decodeしてからAES暗号形式のデータを復号化する

引数
stringデコードする文字列
string暗号キー
16進数IV
戻り値
string 複合データ
static GenericUtilities::doHexEncryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

AES暗号形式でデータを暗号化し、base64encodeする

引数
stringエンコードする文字列
string暗号キー
16進数IV
戻り値
string base64encodeされた暗号データ
static GenericUtilities::encryptAES (   $argValue,
  $argKey,
  $argIV = null,
  $argPrefix = '',
  $argSuffix = '' 
)
static

AES暗号形式でデータを暗号化する

引数
$argValueエンコードする値
$argKey暗号キー
$argIvIV
戻り値
$encrypt 暗号化データ
static GenericUtilities::getBacktraceExceptionLine ( )
static

メソッド呼び出し元のエラーとしてExceptionする際の Line情報を構成する

static GenericUtilities::getStarSign (   $argFormat = 2,
  $argDate = NULL,
  $argBeforeTimezone = NULL,
  $argAfterTimezone = NULL 
)
static

星座を返す 1:やぎ座 2:みずかめ座 3:うお座 4:おうし座 5:おひつじ座 6:ふたご座 7:かに座 8:しし座 9:おとめ座 10:てんびん座 11:さそり座 12:いて座

static GenericUtilities::isMobileCrawler ( )
static

携帯クローラ判定

戻り値
bool true:クローラ、false:非クローラ
static GenericUtilities::lowerArrKeys (   $argument)
static

配列のkey名にstrtolowerを掛ける

static GenericUtilities::modifyDate (   $argModify,
  $argFormat,
  $argDate = NULL,
  $argBeforeTimezone = NULL,
  $argAfterTimezone = NULL 
)
static

2038年問題対応用のstrtotimeっぽいメソッド

static GenericUtilities::now (   $argTimezone = NULL)
static

2038年問題対応用の現在プロセス時間返却メソッド 1プロセス内では同じ値が常に返る事に注意!!


このクラス詳解は次のファイルから抽出されました: