いろいろ準備中

Archive for 1月 17th, 2008

[Zend Framework] Zend_Session_Namespace ③

木曜日, 1月 17th, 2008 Posted in Zend Framework | No Comments »

前回続き。 Zend_Session、Zend_Session_Namespaceでは、セッション自体の有効期限のほかに独自で有効期限を管理しています。 有効期限の方法は、時間とHOP数(参照回数のようなもの)で指定できます。 Zend_Session_Namespaceで有効期限を設定する関数は、 setExpirationSeconds($seconds, $variables = null) setExpirationHops($hops, $variables = null, $hopCountOnUsageOnly = false) の2つで、名前のとおり前者が時間での有効期限、後者がHOP数での有効期限が設定できます。 setExpirationSeconds()の$secondsで有効期限の秒数を、$variablesで有効期限を設定する値を指定します(指定しない場合はネームスペース全体となります)。