<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

class WebPrivileges extends Datamodul
{
  public $id;
  public $keynumber;
  public $description;
  public $tool_id;

  public function getTyp($pFieldName)
  {
    switch ($pFieldName) {
      default:
        return parent::getTyp($pFieldName);
      case 'tool_id':
        return \DatamodulVarType::TYPE_INT;
    }
  }

  public function getGroup()
  {
    return StringOperations::substr($this->description, 0, StringOperations::strpos($this->description, ','));
  }

  public function getName()
  {
    
    return StringOperations::substr($this->description, StringOperations::strpos($this->description, ',') + 2);
  }
}