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' into acceptHandling
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Http/Header/AbstractAccept.php
	library/Zend/Http/Header/AcceptEncoding.php
	library/Zend/Http/Header/AcceptLanguage.php
	tests/Zend/Http/Header/AcceptCharsetTest.php
	tests/Zend/Http/Header/AcceptEncodingTest.php
	tests/Zend/Http/Header/AcceptLanguageTest.php
	tests/Zend/Http/Header/AcceptTest.php
  • Loading branch information
Show file tree
Hide file tree
Showing 17 changed files with 163 additions and 163 deletions.
16 changes: 8 additions & 8 deletions src/AbstractManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ abstract class AbstractManager implements Manager
/**
* Constructor
*
* Allow passing a configuration object or class name, a storage object or
* Allow passing a configuration object or class name, a storage object or
* class name, or an array of configuration.
*
* @param Configuration $config
* @param Storage $storage
*
* @param Configuration $config
* @param Storage $storage
* @param SaveHandler $saveHandler
* @return void
*/
Expand All @@ -76,7 +76,7 @@ public function __construct(Configuration $config = null, Storage $storage = nul
/**
* Set configuration object
*
* @param null|Configuration $config
* @param null|Configuration $config
* @return void
*/
public function setOptions(Configuration $config = null)
Expand All @@ -93,7 +93,7 @@ public function setOptions(Configuration $config = null)

/**
* Retrieve configuration object
*
*
* @return Configuration
*/
public function getConfig()
Expand All @@ -104,7 +104,7 @@ public function getConfig()
/**
* Set session storage object
*
* @param null|Storage $storage
* @param null|Storage $storage
* @return void
*/
public function setStorage(Storage $storage = null)
Expand All @@ -121,7 +121,7 @@ public function setStorage(Storage $storage = null)

/**
* Retrieve storage object
*
*
* @return Storage
*/
public function getStorage()
Expand Down
118 changes: 59 additions & 59 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
/**
* Session storage container
*
* Allows for interacting with session storage in isolated containers, which
* may have their own expiries, or even expiries per key in the container.
* Additionally, expiries may be absolute TTLs or measured in "hops", which
* Allows for interacting with session storage in isolated containers, which
* may have their own expiries, or even expiries per key in the container.
* Additionally, expiries may be absolute TTLs or measured in "hops", which
* are based on how many times the key or container were accessed.
*
* @category Zend
Expand Down Expand Up @@ -52,9 +52,9 @@ class Container extends ArrayObject
* Constructor
*
* Provide a name ('Default' if none provided) and a ManagerInterface instance.
*
* @param null|string $name
* @param Manager $manager
*
* @param null|string $name
* @param Manager $manager
* @return void
*/
public function __construct($name = 'Default', Manager $manager = null)
Expand All @@ -74,8 +74,8 @@ public function __construct($name = 'Default', Manager $manager = null)

/**
* Set the default ManagerInterface instance to use when none provided to constructor
*
* @param Manager $manager
*
* @param Manager $manager
* @return void
*/
public static function setDefaultManager(Manager $manager = null)
Expand All @@ -87,7 +87,7 @@ public static function setDefaultManager(Manager $manager = null)
* Get the default ManagerInterface instance
*
* If none provided, instantiates one of type {@link $managerDefaultClass}
*
*
* @return Manager
* @throws Exception\InvalidArgumentException if invalid manager default class provided
*/
Expand All @@ -105,7 +105,7 @@ public static function getDefaultManager()

/**
* Get container name
*
*
* @return string
*/
public function getName()
Expand All @@ -115,7 +115,7 @@ public function getName()

/**
* Get manager instance
*
*
* @return Manager
*/
public function getManager()
Expand All @@ -125,8 +125,8 @@ public function getManager()

/**
* Set session manager
*
* @param null|Manager $manager
*
* @param null|Manager $manager
* @return Container
*/
protected function setManager(Manager $manager = null)
Expand All @@ -145,7 +145,7 @@ protected function setManager(Manager $manager = null)
* Get session storage object
*
* Proxies to ManagerInterface::getStorage()
*
*
* @return Storage
*/
protected function getStorage()
Expand All @@ -155,7 +155,7 @@ protected function getStorage()

/**
* Create a new container object on which to act
*
*
* @return ArrayObject
*/
protected function createContainer()
Expand All @@ -166,11 +166,11 @@ protected function createContainer()
/**
* Verify container namespace
*
* Checks to see if a container exists within the Storage object already.
* Checks to see if a container exists within the Storage object already.
* If not, one is created; if so, checks to see if it's an ArrayObject.
* If not, it raises an exception; otherwise, it returns the Storage
* If not, it raises an exception; otherwise, it returns the Storage
* object.
*
*
* @param bool $createContainer Whether or not to create the container for the namespace
* @return Storage|null Returns null only if $createContainer is false
* @throws Exception\RuntimeException
Expand All @@ -195,8 +195,8 @@ protected function verifyNamespace($createContainer = true)
* Determine whether a given key needs to be expired
*
* Returns true if the key has expired, false otherwise.
*
* @param null|string $key
*
* @param null|string $key
* @return bool
*/
protected function expireKeys($key = null)
Expand All @@ -223,10 +223,10 @@ protected function expireKeys($key = null)
/**
* Expire a key by expiry time
*
* Checks to see if the entire container has expired based on TTL setting,
* Checks to see if the entire container has expired based on TTL setting,
* or the individual key.
*
* @param Storage $storage
*
* @param Storage $storage
* @param string $name Container name
* @param string $key Key in container to check
* @return bool
Expand All @@ -236,8 +236,8 @@ protected function expireByExpiryTime(Storage $storage, $name, $key)
$metadata = $storage->getMetadata($name);

// Global container expiry
if (is_array($metadata)
&& isset($metadata['EXPIRE'])
if (is_array($metadata)
&& isset($metadata['EXPIRE'])
&& ($_SERVER['REQUEST_TIME'] > $metadata['EXPIRE'])
) {
unset($metadata['EXPIRE']);
Expand All @@ -248,9 +248,9 @@ protected function expireByExpiryTime(Storage $storage, $name, $key)

// Expire individual key
if ((null !== $key)
&& is_array($metadata)
&& isset($metadata['EXPIRE_KEYS'])
&& isset($metadata['EXPIRE_KEYS'][$key])
&& is_array($metadata)
&& isset($metadata['EXPIRE_KEYS'])
&& isset($metadata['EXPIRE_KEYS'][$key])
&& ($_SERVER['REQUEST_TIME'] > $metadata['EXPIRE_KEYS'][$key])
) {
unset($metadata['EXPIRE_KEYS'][$key]);
Expand All @@ -261,8 +261,8 @@ protected function expireByExpiryTime(Storage $storage, $name, $key)

// Find any keys that have expired
if ((null === $key)
&& is_array($metadata)
&& isset($metadata['EXPIRE_KEYS'])
&& is_array($metadata)
&& isset($metadata['EXPIRE_KEYS'])
) {
foreach (array_keys($metadata['EXPIRE_KEYS']) as $key) {
if ($_SERVER['REQUEST_TIME'] > $metadata['EXPIRE_KEYS'][$key]) {
Expand All @@ -282,12 +282,12 @@ protected function expireByExpiryTime(Storage $storage, $name, $key)
/**
* Expire key by session hops
*
* Determines whether the container or an individual key within it has
* Determines whether the container or an individual key within it has
* expired based on session hops
*
* @param Storage $storage
* @param string $name
* @param string $key
*
* @param Storage $storage
* @param string $name
* @param string $key
* @return bool
*/
protected function expireByHops(Storage $storage, $name, $key)
Expand All @@ -296,8 +296,8 @@ protected function expireByHops(Storage $storage, $name, $key)
$metadata = $storage->getMetadata($name);

// Global container expiry
if (is_array($metadata)
&& isset($metadata['EXPIRE_HOPS'])
if (is_array($metadata)
&& isset($metadata['EXPIRE_HOPS'])
&& ($ts > $metadata['EXPIRE_HOPS']['ts'])
) {
$metadata['EXPIRE_HOPS']['hops']--;
Expand All @@ -314,9 +314,9 @@ protected function expireByHops(Storage $storage, $name, $key)

// Single key expiry
if ((null !== $key)
&& is_array($metadata)
&& isset($metadata['EXPIRE_HOPS_KEYS'])
&& isset($metadata['EXPIRE_HOPS_KEYS'][$key])
&& is_array($metadata)
&& isset($metadata['EXPIRE_HOPS_KEYS'])
&& isset($metadata['EXPIRE_HOPS_KEYS'][$key])
&& ($ts > $metadata['EXPIRE_HOPS_KEYS'][$key]['ts'])
) {
$metadata['EXPIRE_HOPS_KEYS'][$key]['hops']--;
Expand All @@ -333,8 +333,8 @@ protected function expireByHops(Storage $storage, $name, $key)

// Find all expired keys
if ((null === $key)
&& is_array($metadata)
&& isset($metadata['EXPIRE_HOPS_KEYS'])
&& is_array($metadata)
&& isset($metadata['EXPIRE_HOPS_KEYS'])
) {
foreach (array_keys($metadata['EXPIRE_HOPS_KEYS']) as $key) {
if ($ts > $metadata['EXPIRE_HOPS_KEYS'][$key]['ts']) {
Expand All @@ -357,9 +357,9 @@ protected function expireByHops(Storage $storage, $name, $key)

/**
* Store a value within the container
*
* @param string $key
* @param mixed $value
*
* @param string $key
* @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
Expand All @@ -372,8 +372,8 @@ public function offsetSet($key, $value)

/**
* Determine if the key exists
*
* @param string $key
*
* @param string $key
* @return bool
*/
public function offsetExists($key)
Expand All @@ -395,8 +395,8 @@ public function offsetExists($key)

/**
* Retrieve a specific key in the container
*
* @param string $key
*
* @param string $key
* @return mixed
*/
public function offsetGet($key)
Expand All @@ -411,8 +411,8 @@ public function offsetGet($key)

/**
* Unset a single key in the container
*
* @param string $key
*
* @param string $key
* @return void
*/
public function offsetUnset($key)
Expand All @@ -427,7 +427,7 @@ public function offsetUnset($key)

/**
* Iterate over session container
*
*
* @return Iterator
*/
public function getIterator()
Expand All @@ -442,9 +442,9 @@ public function getIterator()
* Set expiration TTL
*
* Set the TTL for the entire container, a single key, or a set of keys.
*
*
* @param int $ttl TTL in seconds
* @param null|string|array $vars
* @param null|string|array $vars
* @return Container
*/
public function setExpirationSeconds($ttl, $vars = null)
Expand Down Expand Up @@ -479,17 +479,17 @@ public function setExpirationSeconds($ttl, $vars = null)
}

$storage->setMetadata(
$this->getName(),
$this->getName(),
$data
);
return $this;
}

/**
* Set expiration hops for the container, a single key, or set of keys
*
* @param int $hops
* @param null|string|array $vars
*
* @param int $hops
* @param null|string|array $vars
* @return Container
*/
public function setExpirationHops($hops, $vars = null)
Expand Down Expand Up @@ -525,7 +525,7 @@ public function setExpirationHops($hops, $vars = null)
}

$storage->setMetadata(
$this->getName(),
$this->getName(),
$data
);
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/ManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(Configuration $config = null, Storage $storage = nul
public function getConfig();
public function getStorage();
public function getSaveHandler();

public function sessionExists();
public function start();
public function destroy();
Expand Down
2 changes: 1 addition & 1 deletion src/SaveHandler/DbTableGatewayOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getModifiedColumn()

/**
* Set Modified Column
*
*
* @param string $modifiedColumn
* @return DbTableGatewayOptions
* @throws Exception\InvalidArgumentException
Expand Down
Loading

0 comments on commit ef9466a

Please sign in to comment.