Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 175 deletions.
2 changes: 1 addition & 1 deletion src/Configuration/ConfigurationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function setCookieDomain($cookieDomain);
public function getCookieDomain();
public function setCookieSecure($cookieSecure);
public function getCookieSecure();
public function setCookieHttpOnly($cookieHTTPOnly);
public function setCookieHttpOnly($cookieHttpOnly);
public function getCookieHttpOnly();
public function setUseCookies($useCookies);
public function getUseCookies();
Expand Down
41 changes: 21 additions & 20 deletions src/Configuration/SessionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Zend\Session\Exception;

/**
* Session configuration proxying to session INI options
* Session configuration proxying to session INI options
*
* @category Zend
* @package Zend_Session
Expand Down Expand Up @@ -83,11 +83,11 @@ class SessionConfiguration extends StandardConfiguration
/**
* Set storage option in backend configuration store
*
* Does nothing in this implementation; others might use it to set things
* Does nothing in this implementation; others might use it to set things
* such as INI settings.
*
* @param string $storageName
* @param mixed $storageValue
*
* @param string $storageName
* @param mixed $storageValue
* @return SessionConfiguration
*/
public function setStorageOption($storageName, $storageValue)
Expand All @@ -113,7 +113,7 @@ public function setStorageOption($storageName, $storageValue)
* Retrieve a storage option from a backend configuration store
*
* Used to retrieve default values from a backend configuration store.
*
*
* @param string $storageOption
* @return mixed
*/
Expand All @@ -133,6 +133,7 @@ public function getStorageOption($storageOption)
case 'use_cookies':
case 'use_only_cookies':
case 'use_trans_sid':
case 'cookie_httponly':
$transform = function ($value) {
return (bool) $value;
};
Expand All @@ -150,9 +151,9 @@ public function getStorageOption($storageOption)

/**
* Handle PHP errors
*
* @param int $code
* @param string $message
*
* @param int $code
* @param string $message
* @return void
*/
protected function handleError($code, $message)
Expand All @@ -163,8 +164,8 @@ protected function handleError($code, $message)

/**
* Set session.save_handler
*
* @param string $phpSaveHandler
*
* @param string $phpSaveHandler
* @return SessionConfiguration
* @throws Exception\InvalidArgumentException
*/
Expand All @@ -184,8 +185,8 @@ public function setPhpSaveHandler($phpSaveHandler)

/**
* Set session.serialize_handler
*
* @param string $serializeHandler
*
* @param string $serializeHandler
* @return SessionConfiguration
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -223,18 +224,18 @@ public function setCacheLimiter($cacheLimiter)
ini_set('session.cache_limiter', $cacheLimiter);
return $this;
}

/**
* Retrieve list of valid hash functions
*
*
* @return array
*/
protected function getHashFunctions()
{
if (empty($this->validHashFunctions)) {
/**
* @see http://php.net/manual/en/session.configuration.php#ini.session.hash-function
* "0" and "1" refer to MD5-128 and SHA1-160, respectively, and are
* "0" and "1" refer to MD5-128 and SHA1-160, respectively, and are
* valid in addition to whatever is reported by hash_algos()
*/
$this->validHashFunctions = array('0', '1') + hash_algos();
Expand All @@ -244,8 +245,8 @@ protected function getHashFunctions()

/**
* Set session.hash_function
*
* @param string|int $hashFunction
*
* @param string|int $hashFunction
* @return SessionConfiguration
* @throws Exception\InvalidArgumentException
*/
Expand All @@ -264,8 +265,8 @@ public function setHashFunction($hashFunction)

/**
* Set session.hash_bits_per_character
*
* @param int $hashBitsPerCharacter
*
* @param int $hashBitsPerCharacter
* @return SessionConfiguration
* @throws Exception\InvalidArgumentException
*/
Expand Down
Loading

0 comments on commit facd3ee

Please sign in to comment.