| | 519 | |
| | 520 | |
| | 521 | |
| | 522 | public static function GetPluginName($oModule) { |
| | 523 | if (preg_match('/Plugin([^_]+)/',is_string($oModule) ? $oModule : get_class($oModule),$aMatches)) { |
| | 524 | if(isset($aMatches[1])) { |
| | 525 | return $aMatches[1]; |
| | 526 | } |
| | 527 | } |
| | 528 | return null; |
| | 529 | } |
| | 530 | |
| | 531 | public static function GetPluginPrefix($oModule) { |
| | 532 | if($sPluginName = self::GetPluginName($oModule)) { |
| | 533 | return 'Plugin'.$sPluginName.'_'; |
| | 534 | } |
| | 535 | return ''; |
| | 536 | } |
| | 537 | |
| | 538 | public static function GetModuleName($oModule) { |
| | 539 | if (preg_match('/Module([^_]+)/',is_string($oModule) ? $oModule : get_class($oModule),$aMatches)) { |
| | 540 | if(isset($aMatches[1])) { |
| | 541 | return $aMatches[1]; |
| | 542 | } |
| | 543 | } |
| | 544 | return null; |
| | 545 | } |
| | 546 | |
| | 547 | public static function GetEntityName($oEntity) { |
| | 548 | if (preg_match('/Entity([^_]+)/',is_string($oModule) ? $oModule : get_class($oModule),$aMatches)) { |
| | 549 | if(isset($aMatches[1])) { |
| | 550 | return $aMatches[1]; |
| | 551 | } |
| | 552 | } |
| | 553 | return null; |
| | 554 | } |