sfDoctrineRecord::__toString PHP Метод

__toString() публичный Метод

Returns a string representation of the record.
public __toString ( ) : string
Результат string A string representation of the record
    public function __toString()
    {
        $guesses = array('name', 'title', 'description', 'subject', 'keywords', 'id');
        // we try to guess a column which would give a good description of the object
        foreach ($guesses as $descriptionColumn) {
            try {
                return (string) $this->get($descriptionColumn);
            } catch (Exception $e) {
            }
        }
        return sprintf('No description for object of class "%s"', $this->getTable()->getComponentName());
    }