Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhabricatorCalendarExternalInvitee extends PhabricatorCalendarDAO i..

Decoded Output download

<?php

final class PhabricatorCalendarExternalInvitee
  extends PhabricatorCalendarDAO
  implements PhabricatorPolicyInterface {

  protected $name;
  protected $nameIndex;
  protected $uri;
  protected $parameters = array();
  protected $sourcePHID;

  public static function initializeNewCalendarEventInvitee(
    PhabricatorUser $actor, $event) {
    return id(new PhabricatorCalendarEventInvitee())
      ->setInviterPHID($actor->getPHID())
      ->setStatus(PhabricatorCalendarEventInvitee::STATUS_INVITED)
      ->setEventPHID($event->getPHID());
  }

  protected function getConfiguration() {
    return array(
      self::CONFIG_AUX_PHID => true,
      self::CONFIG_SERIALIZATION => array(
        'parameters' => self::SERIALIZATION_JSON,
      ),
      self::CONFIG_COLUMN_SCHEMA => array(
        'name' => 'text',
        'nameIndex' => 'bytes12',
        'uri' => 'text',
      ),
      self::CONFIG_KEY_SCHEMA => array(
        'key_name' => array(
          'columns' => array('nameIndex'),
          'unique' => true,
        ),
      ),
    ) + parent::getConfiguration();
  }

  public function getPHIDType() {
    return PhabricatorCalendarExternalInviteePHIDType::TYPECONST;
  }

  public function save() {
    $this->nameIndex = PhabricatorHash::digestForIndex($this->getName());
    return parent::save();
  }


/* -(  PhabricatorPolicyInterface  )----------------------------------------- */


  public function getCapabilities() {
    return array(
      PhabricatorPolicyCapability::CAN_VIEW,
    );
  }

  public function getPolicy($capability) {
    switch ($capability) {
      case PhabricatorPolicyCapability::CAN_VIEW:
        return PhabricatorPolicies::getMostOpenPolicy();
    }
  }

  public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
    return false;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorCalendarExternalInvitee
  extends PhabricatorCalendarDAO
  implements PhabricatorPolicyInterface {

  protected $name;
  protected $nameIndex;
  protected $uri;
  protected $parameters = array();
  protected $sourcePHID;

  public static function initializeNewCalendarEventInvitee(
    PhabricatorUser $actor, $event) {
    return id(new PhabricatorCalendarEventInvitee())
      ->setInviterPHID($actor->getPHID())
      ->setStatus(PhabricatorCalendarEventInvitee::STATUS_INVITED)
      ->setEventPHID($event->getPHID());
  }

  protected function getConfiguration() {
    return array(
      self::CONFIG_AUX_PHID => true,
      self::CONFIG_SERIALIZATION => array(
        'parameters' => self::SERIALIZATION_JSON,
      ),
      self::CONFIG_COLUMN_SCHEMA => array(
        'name' => 'text',
        'nameIndex' => 'bytes12',
        'uri' => 'text',
      ),
      self::CONFIG_KEY_SCHEMA => array(
        'key_name' => array(
          'columns' => array('nameIndex'),
          'unique' => true,
        ),
      ),
    ) + parent::getConfiguration();
  }

  public function getPHIDType() {
    return PhabricatorCalendarExternalInviteePHIDType::TYPECONST;
  }

  public function save() {
    $this->nameIndex = PhabricatorHash::digestForIndex($this->getName());
    return parent::save();
  }


/* -(  PhabricatorPolicyInterface  )----------------------------------------- */


  public function getCapabilities() {
    return array(
      PhabricatorPolicyCapability::CAN_VIEW,
    );
  }

  public function getPolicy($capability) {
    switch ($capability) {
      case PhabricatorPolicyCapability::CAN_VIEW:
        return PhabricatorPolicies::getMostOpenPolicy();
    }
  }

  public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
    return false;
  }

}

Function Calls

None

Variables

None

Stats

MD5 5b1a533f6a25220070f83d3e79d2a3ba
Eval Count 0
Decode Time 102 ms