public function policy( Policy $policy )
	{
		$this->loadedPolicies[] = $policy;

		// Caches the policy nodes as a nestable tree
		foreach ( $policy->getNodes() as $namespace => $callable )
			$this->getPermission( $namespace )->addPolicyMethod( $callable );
	}
public function policy( Policy $policy )
	{
		$this->loadedPolicies[] = $policy;

		// Caches the policy nodes as a nestable tree
		foreach ( $policy->getNodes() as $namespace => $callable )
			$this->getPermission( $namespace )->addPolicyMethod( $callable );
	}
public function policy ( Policy $ policy ) { $ this -> loadedPolicies [ ] = $ policy ; // Caches the policy nodes as a nestable tree foreach ( $ policy -> getNodes ( ) as $ namespace => $ callable ) $ this -> getPermission ( $ namespace ) -> addPolicyMethod ( $ callable ) ; }
Adds a new policy checker.

Policies are checked for permissions before they are checked by the general permission backend

@param Policy $policy
Adds a new policy checker .