original_string: public function getAccessEntityForName($class, $name)
      {
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $accessEntity = $em->getRepository($class)->findOneBy(array(
                  'name' => $name,
              ));
              
              if ($accessEntity !== null) {
                  $this->loadPermissions($accessEntity);
              
                  return $accessEntity;
              }
              
              return false;
          } catch (\Exception $e) {
              throw new Exception('Cannot load the access entitiy for the given class "' . $class . '" and name "' . $name . '".', 0, $e);
          }
      }
code: public function getAccessEntityForName($class, $name)
      {
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $accessEntity = $em->getRepository($class)->findOneBy(array(
                  'name' => $name,
              ));
              
              if ($accessEntity !== null) {
                  $this->loadPermissions($accessEntity);
              
                  return $accessEntity;
              }
              
              return false;
          } catch (\Exception $e) {
              throw new Exception('Cannot load the access entitiy for the given class "' . $class . '" and name "' . $name . '".', 0, $e);
          }
      }
code_tokens: public function getAccessEntityForName ( $ class , $ name ) { try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ accessEntity = $ em -> getRepository ( $ class ) -> findOneBy ( array ( 'name' => $ name , ) ) ; if ( $ accessEntity !== null ) { $ this -> loadPermissions ( $ accessEntity ) ; return $ accessEntity ; } return false ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot load the access entitiy for the given class "' . $ class . '" and name "' . $ name . '".' , 0 , $ e ) ; } }
docstring: Returns the access entity object for the given type and name
  
  @access public
  @param string $class
  @param string $name
  @return false|\Zepi\Core\AccessControl\Entity\AccessEntity
  
  @throws \Zepi\Core\AccessControl\Exception Cannot load access entitiy from the database for the given class "{class}" and name "{name}".
docstring_tokens: Returns the access entity object for the given type and name