0

I would like use somethings - if i have encode, then i add in News.class.php public function save and use strtoupper. This working good. How can i make somethings if i get data from database?

my DB:

id | title  | body
1  | title1 | body1
2  | title1 | body2

etc.

if i use $news->getTitle() then i have: title1 i must make:

strtoupper($news->getTitle()) - it is good, but i dont will every time add my function decode. I would like use $news->getTitle() and at once this is strtoupper. Where i can this make? Which file? I dont will edit model generated auto with Symfony. I would like make this in NewsTable.class.php, but how?

1 Answer 1

1

Edit your News.class.php (not the table) file and add this:

public function getTitle()
{
  return urldecode($this->title);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.