Skip to content

Conversation

fbrinker
Copy link

@fbrinker fbrinker commented Feb 1, 2022

I've added class constants to resolve the problem that we have to use a class_exists before using the OPENTBS_PLUGIN constant. New / Additional usage: clsOpenTBS::OPENTBS_PLUGIN. That will trigger the autoloading automatically.

My goal was to keep a maximum of backwards compatibility, since I didn't find any minimum requirements. We could apply a change and use "public const" or even remove the define statements, but I guess that's not that important.

@keeeew
Copy link

keeeew commented Mar 9, 2022

👍

@justADevOps
Copy link

Hello @Skrol29,
do you have any ETA about this merge?

@Skrol29
Copy link
Owner

Skrol29 commented Aug 27, 2022

As mentioned in the documentation, the workaround to load the OpenTBS plugin using PHP auto-loading is simply :

$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, 'clsOpenTBS');

Does that solve the targeted problem ?

@fbrinker
Copy link
Author

Okay I see. We could use the string variant, but why shouldn't we use the proper constant for the string 'clsOpenTBS' when it already exists?

And we would be able to use $tbs->LoadTemplate($template, clsOpenTBS::OPENTBS_ALREADY_UTF8) etc. do see where the constants come from :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants