AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator::_modifyClassNameByPath PHP Метод

_modifyClassNameByPath() приватный Метод

Modifies the given file contents.
С версии: 3.5.4
private _modifyClassNameByPath ( $sFileContents, $sPathInArchive ) : string
Результат string
    private function _modifyClassNameByPath($sFileContents, $sPathInArchive)
    {
        // The inclusion class list file needs to be handled differently.
        if ($this->oFactory->oUtil->hasSuffix('admin-page-framework-include-class-list.php', $sPathInArchive)) {
            return $this->_modifyClassNameOfInclusionList($sFileContents);
        }
        // Insert a included component note in the header comment.
        if ($this->oFactory->oUtil->hasSuffix('admin-page-framework.php', $sPathInArchive)) {
            $sFileContents = $this->_modifyFileDockblock($sFileContents);
            return $this->_modifyClassName($sFileContents);
        }
        $sFileContents = $this->_modifyClassName($sFileContents);
        // If it is the message class, modify the text domain.
        // @deprecated  3.6.0+
        // if ( ! $this->oFactory->oUtil->hasSuffix( 'AdminPageFramework_Message.php', $sPathInArchive ) ) {
        // return $sFileContents;
        // }
        return $this->_modifyTextDomain($sFileContents);
    }