original_string: public function get($role_id)
      {
          $result = &gplcart_static("user.role.get.$role_id");
  
          if (isset($result)) {
              return $result;
          }
  
          $this->hook->attach('user.role.get.before', $role_id, $result, $this);
  
          if (isset($result)) {
              return $result;
          }
  
          $sql = 'SELECT * FROM role WHERE role_id=?';
          $result = $this->db->fetch($sql, array($role_id), array('unserialize' => 'permissions'));
          $this->hook->attach('user.role.get.after', $role_id, $result, $this);
          return $result;
      }
code: public function get($role_id)
      {
          $result = &gplcart_static("user.role.get.$role_id");
  
          if (isset($result)) {
              return $result;
          }
  
          $this->hook->attach('user.role.get.before', $role_id, $result, $this);
  
          if (isset($result)) {
              return $result;
          }
  
          $sql = 'SELECT * FROM role WHERE role_id=?';
          $result = $this->db->fetch($sql, array($role_id), array('unserialize' => 'permissions'));
          $this->hook->attach('user.role.get.after', $role_id, $result, $this);
          return $result;
      }
code_tokens: public function get ( $ role_id ) { $ result = & gplcart_static ( "user.role.get.$role_id" ) ; if ( isset ( $ result ) ) { return $ result ; } $ this -> hook -> attach ( 'user.role.get.before' , $ role_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ sql = 'SELECT * FROM role WHERE role_id=?' ; $ result = $ this -> db -> fetch ( $ sql , array ( $ role_id ) , array ( 'unserialize' => 'permissions' ) ) ; $ this -> hook -> attach ( 'user.role.get.after' , $ role_id , $ result , $ this ) ; return $ result ; }
docstring: Loads a role from the database
  @param integer $role_id
  @return array
docstring_tokens: Loads a role from the database