This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of git://github.com/zendframework/zf2 into string
- Loading branch information
91 parents
df646bf
+
fb9a1b3
+
9b34c27
+
457dc51
+
bd1a8cd
+
21c6816
+
e63ad13
+
ebb65de
+
feaeb97
+
6d76c21
+
8080e99
+
3d8fc08
+
376eb68
+
846ff4b
+
a0b34c2
+
40bdf5a
+
e01831f
+
f22306a
+
8248197
+
740d2ca
+
3e4973e
+
1f71371
+
f945a68
+
6737231
+
7554e22
+
f43a14f
+
5680e05
+
8c71fbe
+
7640752
+
17fca5b
+
3e4bdb7
+
a1ec0e4
+
73e93c4
+
954b983
+
5a4d447
+
08d604f
+
a198091
+
3b2d396
+
ed13b76
+
8c1c902
+
66db3c0
+
88e5c45
+
4766aaf
+
af7efc8
+
2c6ae34
+
ea85a56
+
d1750df
+
665f6e2
+
3e28dac
+
edefcee
+
fed5933
+
55c0906
+
067d44c
+
694c574
+
1ea7f1a
+
e705000
+
5b6a369
+
ce9b366
+
61eaaee
+
1c21891
+
1302107
+
1ec6372
+
ffbf051
+
3a82d12
+
04e8ff0
+
b40d57a
+
e7c04f9
+
7015d6e
+
67d62a9
+
9acf647
+
33f48c3
+
db34ff9
+
c4d0f17
+
f6b222a
+
b74ab9c
+
031d20b
+
d5b278f
+
9115e94
+
65eecd8
+
3beca1c
+
8d86ba5
+
71f73d2
+
f41cf4b
+
34b4e0f
+
5441ea0
+
2817c6f
+
0bdf06b
+
35ea51e
+
7a27ea1
+
057899c
+
20c564d
commit 608988f
Showing
28 changed files
with
606 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,21 @@ | ||
<?php | ||
/** | ||
* Zend Framework | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the new BSD license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://framework.zend.com/license/new-bsd | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@zend.com so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Tag | ||
* @subpackage Cloud | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Tag | ||
*/ | ||
|
||
namespace Zend\Tag\Cloud\Decorator; | ||
|
||
use Traversable; | ||
use Zend\Stdlib\ArrayUtils; | ||
use Zend\Tag\Cloud\Decorator\DecoratorInterface as Decorator; | ||
|
||
/** | ||
* Abstract class for cloud decorators | ||
* | ||
* @category Zend | ||
* @package Zend_Tag | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
abstract class AbstractCloud implements Decorator | ||
abstract class AbstractCloud extends AbstractDecorator | ||
{ | ||
/** | ||
* Option keys to skip when calling setOptions() | ||
* | ||
* @var array | ||
*/ | ||
protected $_skipOptions = array( | ||
'options', | ||
'config', | ||
); | ||
|
||
/** | ||
* Create a new cloud decorator with options | ||
* | ||
* @param array|Traversable $options | ||
*/ | ||
public function __construct($options = null) | ||
{ | ||
if ($options instanceof Traversable) { | ||
$options = ArrayUtils::iteratorToArray($options); | ||
} | ||
if (is_array($options)) { | ||
$this->setOptions($options); | ||
} | ||
} | ||
|
||
/** | ||
* Set options from array | ||
* | ||
* @param array $options Configuration for the decorator | ||
* @return AbstractCloud | ||
*/ | ||
public function setOptions(array $options) | ||
{ | ||
foreach ($options as $key => $value) { | ||
if (in_array(strtolower($key), $this->_skipOptions)) { | ||
continue; | ||
} | ||
|
||
$method = 'set' . $key; | ||
if (method_exists($this, $method)) { | ||
$this->$method($value); | ||
} | ||
} | ||
|
||
return $this; | ||
} | ||
} |
Oops, something went wrong.