Skip to content

Commit

Permalink
Merge branch 'master' into feature/db-story-35 [zen-35]
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Db/Sql/Select.php
	tests/Zend/Db/Sql/SelectTest.php
  • Loading branch information
Ralph Schindler committed May 3, 2012
2 parents 83155f6 + f51ca66 commit 31bf042
Show file tree
Hide file tree
Showing 280 changed files with 6,735 additions and 5,890 deletions.
157 changes: 75 additions & 82 deletions Zend/Acl/Acl.php

Large diffs are not rendered by default.

Expand Up @@ -18,18 +18,16 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Acl;
namespace Zend\Acl\Assertion;

use Zend\Acl;
/**
* @uses Zend\Acl\Acl
* @uses Zend\Acl\Resource
* @uses Zend\Acl\Role
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Assertion
interface AssertionInterface
{
/**
* Returns true if and only if the assertion conditions are met
Expand All @@ -38,11 +36,11 @@ interface Assertion
* $role, $resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or
* privileges, respectively.
*
* @param Acl $acl
* @param Role $role
* @param Resource $resource
* @param string $privilege
* @param Acl $acl
* @param Role\RoleInterface $role
* @param Resource\ResourceInterface $resource
* @param string $privilege
* @return boolean
*/
public function assert(Acl $acl, Role $role = null, Resource $resource = null, $privilege = null);
public function assert(Acl\Acl $acl, Acl\Role\RoleInterface $role = null, Acl\Resource\ResourceInterface $resource = null, $privilege = null);
}
Expand Up @@ -18,14 +18,13 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Acl;
namespace Zend\Acl\Exception;

/**
* @uses Zend\Exception
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Exception
interface ExceptionInterface
{}
2 changes: 1 addition & 1 deletion Zend/Acl/Exception/InvalidArgumentException.php
Expand Up @@ -4,7 +4,7 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Acl\Exception
implements \Zend\Acl\Exception\ExceptionInterface
{

}
2 changes: 1 addition & 1 deletion Zend/Acl/Exception/RuntimeException.php
Expand Up @@ -4,7 +4,7 @@

class RuntimeException
extends \RuntimeException
implements \Zend\Acl\Exception
implements \Zend\Acl\Exception\ExceptionInterface
{

}
5 changes: 2 additions & 3 deletions Zend/Acl/Resource/GenericResource.php
Expand Up @@ -20,16 +20,15 @@

namespace Zend\Acl\Resource;

use Zend\Acl\Resource;
use Zend\Acl\Resource\ResourceInterface;

/**
* @uses \Zend\Acl\Resource\ResourceInterface
* @category Zend
* @package Zend_Acl
* @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 GenericResource implements Resource
class GenericResource implements ResourceInterface
{
/**
* Unique id of Resource
Expand Down
Expand Up @@ -18,15 +18,15 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Acl;
namespace Zend\Acl\Resource;

/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Resource
interface ResourceInterface
{
/**
* Returns the string identifier of the Resource
Expand Down
9 changes: 4 additions & 5 deletions Zend/Acl/Role/GenericRole.php
Expand Up @@ -20,16 +20,15 @@

namespace Zend\Acl\Role;

use Zend\Acl\Role;
use Zend\Acl\Role\RoleInterface;

/**
* @uses Zend\Acl\Role
* @category Zend
* @package Zend_Acl
* @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 GenericRole implements Role
class GenericRole implements RoleInterface
{
/**
* Unique id of Role
Expand All @@ -50,7 +49,7 @@ public function __construct($roleId)
}

/**
* Defined by Zend\Acl\Role; returns the Role identifier
* Defined by Zend\Acl\Role\RoleInterface; returns the Role identifier
*
* @return string
*/
Expand All @@ -60,7 +59,7 @@ public function getRoleId()
}

/**
* Defined by Zend\Acl\Role; returns the Role identifier
* Defined by Zend\Acl\Role\RoleInterface; returns the Role identifier
* Proxies to getRoleId()
*
* @return string
Expand Down
26 changes: 12 additions & 14 deletions Zend/Acl/Role/Registry.php
Expand Up @@ -26,8 +26,6 @@


/**
* @uses Zend\Acl\Role
* @uses Zend\Acl\Role\Exception
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
Expand Down Expand Up @@ -56,12 +54,12 @@ class Registry
* will have the least priority, and the last parent added will have the
* highest priority.
*
* @param \Zend\Acl\Role $role
* @param \Zend\Acl\Role|string|array $parents
* @param \Zend\Acl\Role\RoleInterface $role
* @param \Zend\Acl\Role\RoleInterface|string|array $parents
* @throws \Zend\Acl\Exception\InvalidArgumentException
* @return Registry Provides a fluent interface
*/
public function add(Role $role, $parents = null)
public function add(Role\RoleInterface $role, $parents = null)
{
$roleId = $role->getRoleId();

Expand All @@ -77,13 +75,13 @@ public function add(Role $role, $parents = null)
}
foreach ($parents as $parent) {
try {
if ($parent instanceof Role) {
if ($parent instanceof Role\RoleInterface) {
$roleParentId = $parent->getRoleId();
} else {
$roleParentId = $parent;
}
$roleParent = $this->get($roleParentId);
} catch (Exception $e) {
} catch (\Exception $e) {
throw new Acl\Exception\InvalidArgumentException("Parent Role id '$roleParentId' does not exist", 0, $e);
}
$roleParents[$roleParentId] = $roleParent;
Expand Down Expand Up @@ -111,7 +109,7 @@ public function add(Role $role, $parents = null)
*/
public function get($role)
{
if ($role instanceof Role) {
if ($role instanceof Role\RoleInterface) {
$roleId = $role->getRoleId();
} else {
$roleId = (string) $role;
Expand All @@ -134,7 +132,7 @@ public function get($role)
*/
public function has($role)
{
if ($role instanceof Role) {
if ($role instanceof Role\RoleInterface) {
$roleId = $role->getRoleId();
} else {
$roleId = (string) $role;
Expand All @@ -154,7 +152,7 @@ public function has($role)
* If the Role does not have any parents, then an empty array is returned.
*
* @uses Zend\Acl\Role\Registry::get()
* @param \Zend\Acl\Role|string $role
* @param \Zend\Acl\Role\RoleInterface|string $role
* @return array
*/
public function getParents($role)
Expand All @@ -173,9 +171,9 @@ public function getParents($role)
* through the entire inheritance DAG to determine whether $role
* inherits from $inherit through its ancestor Roles.
*
* @param \Zend\Acl\Role|string $role
* @param \Zend\Acl\Role|string $inherit
* @param boolean $onlyParents
* @param \Zend\Acl\Role\RoleInterface|string $role
* @param \Zend\Acl\Role\RoleInterface|string $inherit
* @param boolean $onlyParents
* @throws \Zend\Acl\Exception\InvalidArgumentException
* @return boolean
*/
Expand Down Expand Up @@ -208,7 +206,7 @@ public function inherits($role, $inherit, $onlyParents = false)
*
* The $role parameter can either be a Role or a Role identifier.
*
* @param \Zend\Acl\Role|string $role
* @param \Zend\Acl\Role\RoleInterface|string $role
* @throws \Zend\Acl\Exception\InvalidArgumentException
* @return Registry Provides a fluent interface
*/
Expand Down
4 changes: 2 additions & 2 deletions Zend/Acl/Role.php → Zend/Acl/Role/RoleInterface.php
Expand Up @@ -18,15 +18,15 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Acl;
namespace Zend\Acl\Role;

/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Role
interface RoleInterface
{
/**
* Returns the string identifier of the Role
Expand Down
Expand Up @@ -19,7 +19,7 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Authentication;
namespace Zend\Authentication\Adapter;

/**
* @category Zend
Expand All @@ -28,13 +28,13 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Adapter
interface AdapterInterface
{
/**
* Performs an authentication attempt
*
* @return Zend\Authentication\Result
* @throws Zend\Authentication\Adapter\Exception If authentication cannot be performed
* @throws Zend\Authentication\Adapter\Exception\ExceptionInterface If authentication cannot be performed
*/
public function authenticate();
}

0 comments on commit 31bf042

Please sign in to comment.