original_string: public function permissionList()
    {
      if($this->permissionList === null)
      {
        $this->fetchPermissionList();
      }
  
      foreach($this->permissionList as $permname => $permdata)
      {
        if(isset($permdata["permcatid"]) && $permdata["permgrant"])
        {
          continue;
        }
  
        $this->permissionList[$permname]["permcatid"] = $this->permissionGetCategoryById($permdata["permid"]);
        $this->permissionList[$permname]["permgrant"] = $this->permissionGetGrantById($permdata["permid"]);
  
        $grantsid = "i_needed_modify_power_" . substr($permname, 2);
  
        if(!$permdata["permname"]->startsWith("i_needed_modify_power_") && !isset($this->permissionList[$grantsid]))
        {
          $this->permissionList[$grantsid]["permid"]    = $this->permissionList[$permname]["permgrant"];
          $this->permissionList[$grantsid]["permname"]  = Str::factory($grantsid);
          $this->permissionList[$grantsid]["permdesc"]  = null;
          $this->permissionList[$grantsid]["permcatid"] = 0xFF;
          $this->permissionList[$grantsid]["permgrant"] = $this->permissionList[$permname]["permgrant"];
        }
      }
  
      return $this->permissionList;
    }
code: public function permissionList()
    {
      if($this->permissionList === null)
      {
        $this->fetchPermissionList();
      }
  
      foreach($this->permissionList as $permname => $permdata)
      {
        if(isset($permdata["permcatid"]) && $permdata["permgrant"])
        {
          continue;
        }
  
        $this->permissionList[$permname]["permcatid"] = $this->permissionGetCategoryById($permdata["permid"]);
        $this->permissionList[$permname]["permgrant"] = $this->permissionGetGrantById($permdata["permid"]);
  
        $grantsid = "i_needed_modify_power_" . substr($permname, 2);
  
        if(!$permdata["permname"]->startsWith("i_needed_modify_power_") && !isset($this->permissionList[$grantsid]))
        {
          $this->permissionList[$grantsid]["permid"]    = $this->permissionList[$permname]["permgrant"];
          $this->permissionList[$grantsid]["permname"]  = Str::factory($grantsid);
          $this->permissionList[$grantsid]["permdesc"]  = null;
          $this->permissionList[$grantsid]["permcatid"] = 0xFF;
          $this->permissionList[$grantsid]["permgrant"] = $this->permissionList[$permname]["permgrant"];
        }
      }
  
      return $this->permissionList;
    }
code_tokens: public function permissionList ( ) { if ( $ this -> permissionList === null ) { $ this -> fetchPermissionList ( ) ; } foreach ( $ this -> permissionList as $ permname => $ permdata ) { if ( isset ( $ permdata [ "permcatid" ] ) && $ permdata [ "permgrant" ] ) { continue ; } $ this -> permissionList [ $ permname ] [ "permcatid" ] = $ this -> permissionGetCategoryById ( $ permdata [ "permid" ] ) ; $ this -> permissionList [ $ permname ] [ "permgrant" ] = $ this -> permissionGetGrantById ( $ permdata [ "permid" ] ) ; $ grantsid = "i_needed_modify_power_" . substr ( $ permname , 2 ) ; if ( ! $ permdata [ "permname" ] -> startsWith ( "i_needed_modify_power_" ) && ! isset ( $ this -> permissionList [ $ grantsid ] ) ) { $ this -> permissionList [ $ grantsid ] [ "permid" ] = $ this -> permissionList [ $ permname ] [ "permgrant" ] ; $ this -> permissionList [ $ grantsid ] [ "permname" ] = Str :: factory ( $ grantsid ) ; $ this -> permissionList [ $ grantsid ] [ "permdesc" ] = null ; $ this -> permissionList [ $ grantsid ] [ "permcatid" ] = 0xFF ; $ this -> permissionList [ $ grantsid ] [ "permgrant" ] = $ this -> permissionList [ $ permname ] [ "permgrant" ] ; } } return $ this -> permissionList ; }
docstring: Returns a list of permissions available on the server instance.
  
  @return array
docstring_tokens: Returns a list of permissions available on the server instance .