You are here

class apply_for_role_application in Apply for role 8

Definition of a singular apply for role application, as used by application manager and potentially beyond.

Hierarchy

Expanded class hierarchy of apply_for_role_application

File

src/application_manager.php, line 294
Contains two classes.

Namespace

Drupal\apply_for_role
View source
class apply_for_role_application {
  private $aid;
  private $uid;
  private $rids;
  private $status;
  private $created;
  private $message;

  // Constructor.
  public function __construct($aid, $uid, $rids = NULL, $status = 0, $created = NULL, $message = NULL) {
    $this->aid = $aid;
    $this->uid = $uid;
    $this->rids = $rids;
    $this->status = $status;
    $this->created = $created ? $created : time();
    $this->message = $message;
  }

  // Property getter.
  public function get($property) {
    return $this->{$property};
  }

  // Property getter that returns ALL values at once.
  public function get_all_values() {
    return array(
      'aid' => $this->aid,
      'uid' => $this->uid,
      'rids' => $this->rids,
      'status' => $this->status,
      'created' => $this->created,
      'message' => $this->message,
    );
  }

  // Property setter.
  public function set($property, $value) {
    $this->{$property} = $value;
  }

}

Members