Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generate method to MetaTags, Schema and Robots #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MuhammadSaim
Copy link

Twig and other templating engines do not convert objects to a string add method generate() to generate string on demand anywhere in the template.

// schema
$schema->generate();

// metatags
$metatags->generate();

// robots
$robots->generate();

@melbahja
Copy link
Owner

We don't need a generate func since we have __toString method

@marclaporte
Copy link
Contributor

@MuhammadSaim Thoughts?

@MuhammadSaim
Copy link
Author

@marclaporte I was working on the Codeigniter 3 with Twig integrated and using this package need to return the string because Twig is not converting the object to a string with __toString(). Hence, I need a method that generates the string and I can pass it to the template engine and render it as a raw HTML. That's why I propose this.

Sorry new to OpenSource just learning the norms and rules of PRs Thanks

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.

None yet

3 participants