Y
Y
Yuri Grinev2014-03-05 13:04:41
PHP
Yuri Grinev, 2014-03-05 13:04:41

How to extend Tag model in Phalcon framework?

Hello.
Recently, I started to understand the Phalcon framework. Everything would be wonderful, but there is one thing.
The falcon has this expression.
Phalcon\Tag::getTitle();
It gets the value of the title, which we set like this: And now the crux of the problem. Tag doesn't have the methods I need. How do I expand Phalcon\Tag to fit
Phalcon\Tag::setTitle('СуперСайт');

Phalcon\Tag::setDescription('СуперОписание');
Phalcon\Tag::getDescription();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kompi, 2014-03-05
@linakun

Use standard techniques when working with OOP.
Extend the Phalcon\Tag base class.
PS The framework uses an autoloader to initialize its classes, so in order to make your inherited one work, it also needs to be added through the autoloader.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question