П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 6443 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 8556 раз(а).

Учебник HTML.
Просмотров 5170 раз(а).

Руководство по PHP5.
Просмотров 2328 раз(а).

Хостинг через призму DNS.
Просмотров 7523 раз(а).

Подборка текстов стандартных документов.
Просмотров 147 раз(а).

Учебник PHP - Самоучитель
Просмотров 5442 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 11654 раз(а).

Внешние атаки...
Просмотров 7900 раз(а).

Учебник PHP.
Просмотров 4564 раз(а).

SSI в примерах.
Просмотров 1400 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. Глава 18. Classes and Objects (PHP 4) След.

The magic functions __sleep and __wakeup

serialize() checks if your class has a function with the magic name __sleep. If so, that function is being run prior to any serialization. It can clean up the object and is supposed to return an array with the names of all variables of that object that should be serialized.

The intended use of __sleep is to close any database connections that object may have, committing pending data or perform similar cleanup tasks. Also, the function is useful if you have very large objects which need not be saved completely.

Conversely, unserialize() checks for the presence of a function with the magic name __wakeup. If present, this function can reconstruct any resources that object may have.

The intended use of __wakeup is to reestablish any database connections that may have been lost during serialization and perform other reinitialization tasks.


Пред. Начало След.
Serializing objects - objects in sessions Уровень выше References inside the constructor


Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru