Legend:
- Unmodified
- Added
- Removed
-
base.php
r21 r22 477 477 function GetTypeDefinition($Id) 478 478 { 479 global $Database, $Types ;479 global $Database, $Types, $TypeDefinitionList; 480 480 481 481 if(!array_key_exists($Id, $Types)) … … 499 499 $DbRow['BaseType'] = $ParentType['Name']; 500 500 } 501 if(!array_key_exists($DbRow['BaseType'], $TypeDefinitionList)) 502 { 503 $ClassName = 'Type'.$DbRow['BaseType']; 504 $TypeDefinitionList[$DbRow['BaseType']] = new $ClassName; 505 } 506 $DbRow['Class'] = &$TypeDefinitionList[$DbRow['BaseType']]; 501 507 $Types[$DbRow['ItemId']] = $DbRow; 502 508 } else $Types[$DbRow['ItemId']] = NULL; … … 514 520 function ExecuteTypeEvent($Type, $Event, $Parameters) 515 521 { 516 global $TypeDefinitionList;517 518 522 $TypeDefinition = GetTypeDefinition($Type); 519 $TypeObject = $TypeDefinition List[$TypeDefinition['BaseType']];523 $TypeObject = $TypeDefinition['Class']; 520 524 if(is_callable(array($TypeObject, $Event))) return($TypeObject->$Event($Parameters)); 521 525 else return($TypeDefinition['BaseType'].'->'.$Event.'('.$Type.')');
Note:
See TracChangeset
for help on using the changeset viewer.