Exemplo n.º 1
0
 /**
  * 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 'ContextId':
             /**
              * Gets the value for intContextId (Read-Only PK)
              * @return integer
              */
             return $this->intContextId;
         case 'TextId':
             /**
              * Gets the value for intTextId (Not Null)
              * @return integer
              */
             return $this->intTextId;
         case 'TextAccessKey':
             /**
              * Gets the value for strTextAccessKey 
              * @return string
              */
             return $this->strTextAccessKey;
         case 'TextCommandKey':
             /**
              * Gets the value for strTextCommandKey 
              * @return string
              */
             return $this->strTextCommandKey;
         case 'ProjectId':
             /**
              * Gets the value for intProjectId (Not Null)
              * @return integer
              */
             return $this->intProjectId;
         case 'Context':
             /**
              * Gets the value for strContext (Not Null)
              * @return string
              */
             return $this->strContext;
         case 'ContextMd5':
             /**
              * Gets the value for strContextMd5 (Not Null)
              * @return string
              */
             return $this->strContextMd5;
         case 'Comment':
             /**
              * Gets the value for strComment 
              * @return string
              */
             return $this->strComment;
         case 'CommentMd5':
             /**
              * Gets the value for strCommentMd5 
              * @return string
              */
             return $this->strCommentMd5;
         case 'FileId':
             /**
              * Gets the value for intFileId (Not Null)
              * @return integer
              */
             return $this->intFileId;
         case 'Created':
             /**
              * Gets the value for dttCreated (Not Null)
              * @return QDateTime
              */
             return $this->dttCreated;
         case 'Modified':
             /**
              * Gets the value for dttModified 
              * @return QDateTime
              */
             return $this->dttModified;
         case 'Active':
             /**
              * Gets the value for blnActive (Not Null)
              * @return boolean
              */
             return $this->blnActive;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Text':
             /**
              * Gets the value for the NarroText object referenced by intTextId (Not Null)
              * @return NarroText
              */
             try {
                 if (!$this->objText && !is_null($this->intTextId)) {
                     $this->objText = NarroText::Load($this->intTextId);
                 }
                 return $this->objText;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Project':
             /**
              * Gets the value for the NarroProject object referenced by intProjectId (Not Null)
              * @return NarroProject
              */
             try {
                 if (!$this->objProject && !is_null($this->intProjectId)) {
                     $this->objProject = NarroProject::Load($this->intProjectId);
                 }
                 return $this->objProject;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'File':
             /**
              * Gets the value for the NarroFile object referenced by intFileId (Not Null)
              * @return NarroFile
              */
             try {
                 if (!$this->objFile && !is_null($this->intFileId)) {
                     $this->objFile = NarroFile::Load($this->intFileId);
                 }
                 return $this->objFile;
             } 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 '_NarroContextInfoAsContext':
             /**
              * Gets the value for the private _objNarroContextInfoAsContext (Read-Only)
              * if set due to an expansion on the narro_context_info.context_id reverse relationship
              * @return NarroContextInfo
              */
             return $this->_objNarroContextInfoAsContext;
         case '_NarroContextInfoAsContextArray':
             /**
              * Gets the value for the private _objNarroContextInfoAsContextArray (Read-Only)
              * if set due to an ExpandAsArray on the narro_context_info.context_id reverse relationship
              * @return NarroContextInfo[]
              */
             return $this->_objNarroContextInfoAsContextArray;
         case '_NarroSuggestionVoteAsContext':
             /**
              * Gets the value for the private _objNarroSuggestionVoteAsContext (Read-Only)
              * if set due to an expansion on the narro_suggestion_vote.context_id reverse relationship
              * @return NarroSuggestionVote
              */
             return $this->_objNarroSuggestionVoteAsContext;
         case '_NarroSuggestionVoteAsContextArray':
             /**
              * Gets the value for the private _objNarroSuggestionVoteAsContextArray (Read-Only)
              * if set due to an ExpandAsArray on the narro_suggestion_vote.context_id reverse relationship
              * @return NarroSuggestionVote[]
              */
             return $this->_objNarroSuggestionVoteAsContextArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 /**
  * 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 NarroFileMetaControl
  * @param integer $intFileId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing NarroFile object creation - defaults to CreateOrEdit
  * @return NarroFileMetaControl
  */
 public static function Create($objParentObject, $intFileId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intFileId)) {
         $objNarroFile = NarroFile::Load($intFileId);
         // NarroFile was found -- return it!
         if ($objNarroFile) {
             return new NarroFileMetaControl($objParentObject, $objNarroFile);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a NarroFile object with PK arguments: ' . $intFileId);
             }
         }
         // 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 NarroFileMetaControl($objParentObject, new NarroFile());
 }
Exemplo n.º 3
0
 /**
  * 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 'FileId':
             /**
              * Gets the value for intFileId (Read-Only PK)
              * @return integer
              */
             return $this->intFileId;
         case 'FileName':
             /**
              * Gets the value for strFileName (Not Null)
              * @return string
              */
             return $this->strFileName;
         case 'FilePath':
             /**
              * Gets the value for strFilePath (Not Null)
              * @return string
              */
             return $this->strFilePath;
         case 'FileMd5':
             /**
              * Gets the value for strFileMd5 
              * @return string
              */
             return $this->strFileMd5;
         case 'ParentId':
             /**
              * Gets the value for intParentId 
              * @return integer
              */
             return $this->intParentId;
         case 'TypeId':
             /**
              * Gets the value for intTypeId (Not Null)
              * @return integer
              */
             return $this->intTypeId;
         case 'ProjectId':
             /**
              * Gets the value for intProjectId (Not Null)
              * @return integer
              */
             return $this->intProjectId;
         case 'Active':
             /**
              * Gets the value for blnActive (Not Null)
              * @return boolean
              */
             return $this->blnActive;
         case 'Created':
             /**
              * Gets the value for dttCreated (Not Null)
              * @return QDateTime
              */
             return $this->dttCreated;
         case 'Modified':
             /**
              * Gets the value for dttModified 
              * @return QDateTime
              */
             return $this->dttModified;
         case 'Header':
             /**
              * Gets the value for strHeader 
              * @return string
              */
             return $this->strHeader;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Parent':
             /**
              * Gets the value for the NarroFile object referenced by intParentId 
              * @return NarroFile
              */
             try {
                 if (!$this->objParent && !is_null($this->intParentId)) {
                     $this->objParent = NarroFile::Load($this->intParentId);
                 }
                 return $this->objParent;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Project':
             /**
              * Gets the value for the NarroProject object referenced by intProjectId (Not Null)
              * @return NarroProject
              */
             try {
                 if (!$this->objProject && !is_null($this->intProjectId)) {
                     $this->objProject = NarroProject::Load($this->intProjectId);
                 }
                 return $this->objProject;
             } 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 '_NarroContextAsFile':
             /**
              * Gets the value for the private _objNarroContextAsFile (Read-Only)
              * if set due to an expansion on the narro_context.file_id reverse relationship
              * @return NarroContext
              */
             return $this->_objNarroContextAsFile;
         case '_NarroContextAsFileArray':
             /**
              * Gets the value for the private _objNarroContextAsFileArray (Read-Only)
              * if set due to an ExpandAsArray on the narro_context.file_id reverse relationship
              * @return NarroContext[]
              */
             return $this->_objNarroContextAsFileArray;
         case '_ChildNarroFile':
             /**
              * Gets the value for the private _objChildNarroFile (Read-Only)
              * if set due to an expansion on the narro_file.parent_id reverse relationship
              * @return NarroFile
              */
             return $this->_objChildNarroFile;
         case '_ChildNarroFileArray':
             /**
              * Gets the value for the private _objChildNarroFileArray (Read-Only)
              * if set due to an ExpandAsArray on the narro_file.parent_id reverse relationship
              * @return NarroFile[]
              */
             return $this->_objChildNarroFileArray;
         case '_NarroFileProgressAsFile':
             /**
              * Gets the value for the private _objNarroFileProgressAsFile (Read-Only)
              * if set due to an expansion on the narro_file_progress.file_id reverse relationship
              * @return NarroFileProgress
              */
             return $this->_objNarroFileProgressAsFile;
         case '_NarroFileProgressAsFileArray':
             /**
              * Gets the value for the private _objNarroFileProgressAsFileArray (Read-Only)
              * if set due to an ExpandAsArray on the narro_file_progress.file_id reverse relationship
              * @return NarroFileProgress[]
              */
             return $this->_objNarroFileProgressAsFileArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
Exemplo n.º 4
0
 /**
  * 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 'FileProgressId':
             /**
              * Gets the value for intFileProgressId (Read-Only PK)
              * @return integer
              */
             return $this->intFileProgressId;
         case 'FileId':
             /**
              * Gets the value for intFileId (Not Null)
              * @return integer
              */
             return $this->intFileId;
         case 'LanguageId':
             /**
              * Gets the value for intLanguageId (Not Null)
              * @return integer
              */
             return $this->intLanguageId;
         case 'FileMd5':
             /**
              * Gets the value for strFileMd5 
              * @return string
              */
             return $this->strFileMd5;
         case 'Header':
             /**
              * Gets the value for strHeader 
              * @return string
              */
             return $this->strHeader;
         case 'TotalTextCount':
             /**
              * Gets the value for intTotalTextCount (Not Null)
              * @return integer
              */
             return $this->intTotalTextCount;
         case 'ApprovedTextCount':
             /**
              * Gets the value for intApprovedTextCount (Not Null)
              * @return integer
              */
             return $this->intApprovedTextCount;
         case 'FuzzyTextCount':
             /**
              * Gets the value for intFuzzyTextCount (Not Null)
              * @return integer
              */
             return $this->intFuzzyTextCount;
         case 'ProgressPercent':
             /**
              * Gets the value for intProgressPercent (Not Null)
              * @return integer
              */
             return $this->intProgressPercent;
         case 'Export':
             /**
              * Gets the value for blnExport 
              * @return boolean
              */
             return $this->blnExport;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'File':
             /**
              * Gets the value for the NarroFile object referenced by intFileId (Not Null)
              * @return NarroFile
              */
             try {
                 if (!$this->objFile && !is_null($this->intFileId)) {
                     $this->objFile = NarroFile::Load($this->intFileId);
                 }
                 return $this->objFile;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Language':
             /**
              * Gets the value for the NarroLanguage object referenced by intLanguageId (Not Null)
              * @return NarroLanguage
              */
             try {
                 if (!$this->objLanguage && !is_null($this->intLanguageId)) {
                     $this->objLanguage = NarroLanguage::Load($this->intLanguageId);
                 }
                 return $this->objLanguage;
             } 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':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }