|
dolibarr 24.0.0-beta
|
Validates that generated modulebuilder files contain no residual myobject/mymodule tokens. More...

Public Member Functions | |
| validateContent (string $content, string $filePath) | |
| Scan file content for residual naming tokens after substitution. | |
| validateClassName (string $className, NamingContract $nc) | |
| Validate that a PHP class name matches the contract's objectNameCase. | |
| validateTriggerFilename (string $filename, NamingContract $nc) | |
| Validate that a trigger filename matches the expected pattern. | |
| validateUrl (string $url, NamingContract $nc) | |
| Validate that a URL path contains objectNameLower and no residual 'myobject'. | |
| validateRightsKey (string $rightsKey, NamingContract $nc) | |
| Validate a rights key matches format "moduleNameLower.objectNameLower.perms". | |
Validates that generated modulebuilder files contain no residual myobject/mymodule tokens.
Definition at line 28 of file NamingContractValidator.class.php.
| NamingContractValidator::validateClassName | ( | string | $className, |
| NamingContract | $nc ) |
Validate that a PHP class name matches the contract's objectNameCase.
| string | $className | Class name to validate |
| NamingContract | $nc | Naming contract to compare against |
Implemented in StrictNamingContractValidator.
Scan file content for residual naming tokens after substitution.
Lines containing non-renamable MODULEBUILDER structural markers are excluded from validation.
| string | $content | Full file content to validate |
| string | $filePath | Used in error messages only |
Implemented in StrictNamingContractValidator.
| NamingContractValidator::validateRightsKey | ( | string | $rightsKey, |
| NamingContract | $nc ) |
Validate a rights key matches format "moduleNameLower.objectNameLower.perms".
| string | $rightsKey | Rights key to validate |
| NamingContract | $nc | Naming contract to compare against |
Implemented in StrictNamingContractValidator.
| NamingContractValidator::validateTriggerFilename | ( | string | $filename, |
| NamingContract | $nc ) |
Validate that a trigger filename matches the expected pattern.
Expected pattern: interface_NN_mod{ModuleNameCase}_{ModuleNameCase}Triggers.class.php
| string | $filename | Trigger filename to validate |
| NamingContract | $nc | Naming contract to compare against |
Implemented in StrictNamingContractValidator.
| NamingContractValidator::validateUrl | ( | string | $url, |
| NamingContract | $nc ) |
Validate that a URL path contains objectNameLower and no residual 'myobject'.
| string | $url | URL path to validate |
| NamingContract | $nc | Naming contract to compare against |
Implemented in StrictNamingContractValidator.