Exemplo n.º 1
0
 protected static function GetOperationsHelper(&$objOperationArray, QcodoClass $objClass, $blnIsRootChild)
 {
     $objClassOperations = $objClass->GetOperationArray();
     foreach ($objClassOperations as $objOperation) {
         if ($blnIsRootChild) {
             $objOperation->InheritenceState = InheritenceState::RootChild;
             $objOperationArray[$objOperation->Name] = $objOperation;
         } else {
             if (array_key_exists($objOperation->Name, $objOperationArray)) {
                 // The operation already exists, younger in the array
                 if ($objOperationArray[$objOperation->Name]->InheritenceState == InheritenceState::RootChild) {
                     // This means the operation in the array overrides
                     $objOperationArray[$objOperation->Name]->InheritenceState = InheritenceState::Overrides;
                     $objOperationArray[$objOperation->Name]->OverridesOperation = $objOperation;
                 }
             } else {
                 // The operation doesn't yet exist in the array
                 // So therefore, this class inherits the operation
                 $objOperation->InheritenceState = InheritenceState::Interited;
                 $objOperationArray[$objOperation->Name] = $objOperation;
             }
         }
     }
     if ($objClass->ParentQcodoClassId) {
         QcodoClass::GetOperationsHelper($objOperationArray, $objClass->ParentQcodoClass, false);
     }
 }