本文整理汇总了PHP中Authorization::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Authorization::Load方法的具体用法?PHP Authorization::Load怎么用?PHP Authorization::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authorization
的用法示例。
在下文中一共展示了Authorization::Load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: btnEdit_Click
public function btnEdit_Click($strFormId, $strControlId, $strParameter)
{
$strParameterArray = explode(',', $strParameter);
$objAuthorization = Authorization::Load($strParameterArray[0]);
$objEditPanel = new AuthorizationEditPanel($this, $this->strCloseEditPanelMethod, $objAuthorization);
$strMethodName = $this->strSetEditPanelMethod;
$this->objForm->{$strMethodName}($objEditPanel);
}
示例2: SetupAuthorization
protected function SetupAuthorization()
{
// Lookup Object PK information from Query String (if applicable)
// Set mode to Edit or New depending on what's found
$intAuthorizationId = QApplication::QueryString('intAuthorizationId');
if ($intAuthorizationId) {
$this->objAuthorization = Authorization::Load($intAuthorizationId);
if (!$this->objAuthorization) {
throw new Exception('Could not find a Authorization object with PK arguments: ' . $intAuthorizationId);
}
$this->strTitleVerb = QApplication::Translate('Edit');
$this->blnEditMode = true;
} else {
$this->objAuthorization = new Authorization();
$this->strTitleVerb = QApplication::Translate('Create');
$this->blnEditMode = false;
}
}
示例3: __get
/**
* Override method to perform a property "Get"
* This will get the value of $strName
*
* @param string $strName Name of the property to get
* @return mixed
*/
public function __get($strName)
{
switch ($strName) {
///////////////////
// Member Variables
///////////////////
case 'RoleEntityBuiltInId':
// Gets the value for intRoleEntityBuiltInId (Read-Only PK)
// @return integer
return $this->intRoleEntityBuiltInId;
case 'RoleId':
// Gets the value for intRoleId (Not Null)
// @return integer
return $this->intRoleId;
case 'EntityQtypeId':
// Gets the value for intEntityQtypeId (Not Null)
// @return integer
return $this->intEntityQtypeId;
case 'AuthorizationId':
// Gets the value for intAuthorizationId (Not Null)
// @return integer
return $this->intAuthorizationId;
case 'AuthorizedFlag':
// Gets the value for blnAuthorizedFlag (Not Null)
// @return boolean
return $this->blnAuthorizedFlag;
case 'CreatedBy':
// Gets the value for intCreatedBy
// @return integer
return $this->intCreatedBy;
case 'CreationDate':
// Gets the value for dttCreationDate
// @return QDateTime
return $this->dttCreationDate;
case 'ModifiedBy':
// Gets the value for intModifiedBy
// @return integer
return $this->intModifiedBy;
case 'ModifiedDate':
// Gets the value for strModifiedDate (Read-Only Timestamp)
// @return string
return $this->strModifiedDate;
///////////////////
// Member Objects
///////////////////
///////////////////
// Member Objects
///////////////////
case 'Role':
// Gets the value for the Role object referenced by intRoleId (Not Null)
// @return Role
try {
if (!$this->objRole && !is_null($this->intRoleId)) {
$this->objRole = Role::Load($this->intRoleId);
}
return $this->objRole;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Authorization':
// Gets the value for the Authorization object referenced by intAuthorizationId (Not Null)
// @return Authorization
try {
if (!$this->objAuthorization && !is_null($this->intAuthorizationId)) {
$this->objAuthorization = Authorization::Load($this->intAuthorizationId);
}
return $this->objAuthorization;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'CreatedByObject':
// Gets the value for the UserAccount object referenced by intCreatedBy
// @return UserAccount
try {
if (!$this->objCreatedByObject && !is_null($this->intCreatedBy)) {
$this->objCreatedByObject = UserAccount::Load($this->intCreatedBy);
}
return $this->objCreatedByObject;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'ModifiedByObject':
// Gets the value for the UserAccount object referenced by intModifiedBy
// @return UserAccount
try {
if (!$this->objModifiedByObject && !is_null($this->intModifiedBy)) {
$this->objModifiedByObject = UserAccount::Load($this->intModifiedBy);
}
return $this->objModifiedByObject;
} catch (QCallerException $objExc) {
//.........这里部分代码省略.........
示例4: __get
/**
* Override method to perform a property "Get"
* This will get the value of $strName
*
* @param string $strName Name of the property to get
* @return mixed
*/
public function __get($strName)
{
switch ($strName) {
///////////////////
// Member Variables
///////////////////
case 'ShortcutId':
// Gets the value for intShortcutId (Read-Only PK)
// @return integer
return $this->intShortcutId;
case 'ModuleId':
// Gets the value for intModuleId (Not Null)
// @return integer
return $this->intModuleId;
case 'AuthorizationId':
// Gets the value for intAuthorizationId
// @return integer
return $this->intAuthorizationId;
case 'TransactionTypeId':
// Gets the value for intTransactionTypeId
// @return integer
return $this->intTransactionTypeId;
case 'ShortDescription':
// Gets the value for strShortDescription (Not Null)
// @return string
return $this->strShortDescription;
case 'Link':
// Gets the value for strLink (Not Null)
// @return string
return $this->strLink;
case 'ImagePath':
// Gets the value for strImagePath
// @return string
return $this->strImagePath;
case 'EntityQtypeId':
// Gets the value for intEntityQtypeId (Not Null)
// @return integer
return $this->intEntityQtypeId;
case 'CreateFlag':
// Gets the value for blnCreateFlag (Not Null)
// @return boolean
return $this->blnCreateFlag;
///////////////////
// Member Objects
///////////////////
///////////////////
// Member Objects
///////////////////
case 'Module':
// Gets the value for the Module object referenced by intModuleId (Not Null)
// @return Module
try {
if (!$this->objModule && !is_null($this->intModuleId)) {
$this->objModule = Module::Load($this->intModuleId);
}
return $this->objModule;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Authorization':
// Gets the value for the Authorization object referenced by intAuthorizationId
// @return Authorization
try {
if (!$this->objAuthorization && !is_null($this->intAuthorizationId)) {
$this->objAuthorization = Authorization::Load($this->intAuthorizationId);
}
return $this->objAuthorization;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'TransactionType':
// Gets the value for the TransactionType object referenced by intTransactionTypeId
// @return TransactionType
try {
if (!$this->objTransactionType && !is_null($this->intTransactionTypeId)) {
$this->objTransactionType = TransactionType::Load($this->intTransactionTypeId);
}
return $this->objTransactionType;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
////////////////////////////
// Virtual Object References (Many to Many and Reverse References)
// (If restored via a "Many-to" expansion)
////////////////////////////
////////////////////////////
// Virtual Object References (Many to Many and Reverse References)
// (If restored via a "Many-to" expansion)
////////////////////////////
case '__Restored':
//.........这里部分代码省略.........
示例5: __get
/**
* Override method to perform a property "Get"
* This will get the value of $strName
*
* @param string $strName Name of the property to get
* @return mixed
*/
public function __get($strName)
{
switch ($strName) {
///////////////////
// Member Variables
///////////////////
case 'RoleModuleAuthorizationId':
/**
* Gets the value for intRoleModuleAuthorizationId (Read-Only PK)
* @return integer
*/
return $this->intRoleModuleAuthorizationId;
case 'RoleModuleId':
/**
* Gets the value for intRoleModuleId
* @return integer
*/
return $this->intRoleModuleId;
case 'AuthorizationId':
/**
* Gets the value for intAuthorizationId
* @return integer
*/
return $this->intAuthorizationId;
case 'AuthorizationLevelId':
/**
* Gets the value for intAuthorizationLevelId
* @return integer
*/
return $this->intAuthorizationLevelId;
case 'CreatedBy':
/**
* Gets the value for intCreatedBy
* @return integer
*/
return $this->intCreatedBy;
case 'CreationDate':
/**
* Gets the value for dttCreationDate
* @return QDateTime
*/
return $this->dttCreationDate;
case 'ModifiedBy':
/**
* Gets the value for intModifiedBy
* @return integer
*/
return $this->intModifiedBy;
case 'ModifiedDate':
/**
* Gets the value for strModifiedDate (Read-Only Timestamp)
* @return string
*/
return $this->strModifiedDate;
///////////////////
// Member Objects
///////////////////
///////////////////
// Member Objects
///////////////////
case 'RoleModule':
/**
* Gets the value for the RoleModule object referenced by intRoleModuleId
* @return RoleModule
*/
try {
if (!$this->objRoleModule && !is_null($this->intRoleModuleId)) {
$this->objRoleModule = RoleModule::Load($this->intRoleModuleId);
}
return $this->objRoleModule;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'Authorization':
/**
* Gets the value for the Authorization object referenced by intAuthorizationId
* @return Authorization
*/
try {
if (!$this->objAuthorization && !is_null($this->intAuthorizationId)) {
$this->objAuthorization = Authorization::Load($this->intAuthorizationId);
}
return $this->objAuthorization;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'AuthorizationLevel':
/**
* Gets the value for the AuthorizationLevel object referenced by intAuthorizationLevelId
* @return AuthorizationLevel
*/
//.........这里部分代码省略.........
示例6: Create
/**
* Static Helper Method to Create using PK arguments
* You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
* If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
* static helper methods. Finally, specify a CreateType to define whether or not we are only allowed to
* edit, or if we are also allowed to create a new one, etc.
*
* @param mixed $objParentObject QForm or QPanel which will be using this AuthorizationMetaControl
* @param integer $intAuthorizationId primary key value
* @param QMetaControlCreateType $intCreateType rules governing Authorization object creation - defaults to CreateOrEdit
* @return AuthorizationMetaControl
*/
public static function Create($objParentObject, $intAuthorizationId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
{
// Attempt to Load from PK Arguments
if (strlen($intAuthorizationId)) {
$objAuthorization = Authorization::Load($intAuthorizationId);
// Authorization was found -- return it!
if ($objAuthorization) {
return new AuthorizationMetaControl($objParentObject, $objAuthorization);
} else {
if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
throw new QCallerException('Could not find a Authorization object with PK arguments: ' . $intAuthorizationId);
}
}
// If EditOnly is specified, throw an exception
} else {
if ($intCreateType == QMetaControlCreateType::EditOnly) {
throw new QCallerException('No PK arguments specified');
}
}
// If we are here, then we need to create a new record
return new AuthorizationMetaControl($objParentObject, new Authorization());
}
示例7: Reload
/**
* Reload this Authorization from the database.
* @return void
*/
public function Reload()
{
// Make sure we are actually Restored from the database
if (!$this->__blnRestored) {
throw new QCallerException('Cannot call Reload() on a new, unsaved Authorization object.');
}
// Reload the Object
$objReloaded = Authorization::Load($this->intAuthorizationId);
// Update $this's local variables to match
$this->strShortDescription = $objReloaded->strShortDescription;
}