This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/zendframework/zf2
- Loading branch information
78 parents
e20a2a2
+
1839a34
+
0d5d64e
+
5cde84e
+
dc8ee4d
+
85d900a
+
887c312
+
9c949ae
+
0fc5669
+
e29d393
+
e25c698
+
ca5bdbb
+
18e54b8
+
73cc878
+
a514416
+
778823f
+
fff1957
+
35beb1b
+
ecb2a1a
+
67a31fa
+
c0ee14a
+
7273469
+
62e104e
+
293b0d0
+
c59092f
+
b3e8431
+
615f1cb
+
198a3b9
+
1630584
+
7627438
+
84a5bf6
+
ad86c9d
+
a84a8ca
+
4198a62
+
e822871
+
431867b
+
200dbe0
+
7277f0b
+
2408da8
+
2413f67
+
4731ffc
+
d177c96
+
b27c24b
+
ec13154
+
8e7b30c
+
6c4437a
+
2a2ed86
+
366d656
+
5f3d390
+
666d47b
+
dd0e03b
+
1a5602a
+
c01cd9c
+
6849552
+
8b79ca2
+
e84f0d1
+
9f1b34e
+
c453b3e
+
3d74be7
+
999502e
+
a46d96f
+
fba87c0
+
ce665da
+
ef2dd94
+
a66c89a
+
b997097
+
da0e97d
+
1302f0b
+
a1bbaa9
+
6bfa503
+
b4b9ece
+
9b1ac2d
+
30880b8
+
e308f6d
+
8da89be
+
199755f
+
2310cd0
+
4e7316f
commit 1d6c476
Showing
16 changed files
with
231 additions
and
326 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
/** | ||
* Zend Framework | ||
* | ||
* 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_Paginator | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Paginator; | ||
|
||
use Zend\ServiceManager\AbstractPluginManager; | ||
|
||
/** | ||
* Plugin manager implementation for pagination adapters | ||
* | ||
* Enforces that adapters retrieved are instances of | ||
* Adapter\AdapterInterface. Additionally, it registers a number | ||
* of default adapters available. | ||
* | ||
* @category Zend | ||
* @package Zend_Paginator | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
class AdapterPluginManager extends AbstractPluginManager | ||
{ | ||
/** | ||
* Default set of adapters | ||
* | ||
* @var array | ||
*/ | ||
protected $invokableClasses = array( | ||
'array' => 'Zend\Paginator\Adapter\ArrayAdapter', | ||
'dbselect' => 'Zend\Paginator\Adapter\DbSelect', | ||
'dbtableselect' => 'Zend\Paginator\Adapter\DbTableSelect', | ||
'iterator' => 'Zend\Paginator\Adapter\Iterator', | ||
'null' => 'Zend\Paginator\Adapter\Null', | ||
); | ||
|
||
/** | ||
* @var bool Do not share by default | ||
*/ | ||
protected $shareByDefault = false; | ||
|
||
/** | ||
* Validate the plugin | ||
* | ||
* Checks that the adapter loaded is an instance of Adapter\AdapterInterface. | ||
* | ||
* @param mixed $plugin | ||
* @return void | ||
* @throws Exception\InvalidArgumentException if invalid | ||
*/ | ||
public function validatePlugin($plugin) | ||
{ | ||
if ($plugin instanceof Adapter\AdapterInterface) { | ||
// we're okay | ||
return; | ||
} | ||
|
||
throw new Exception\InvalidArgumentException(sprintf( | ||
'Plugin of type %s is invalid; must implement %s\Adapter\AdapterInterface', | ||
(is_object($plugin) ? get_class($plugin) : gettype($plugin)), | ||
__NAMESPACE__ | ||
)); | ||
} | ||
} |
Oops, something went wrong.