AppserverIo\Appserver\PersistenceContainer\Doctrine\DoctrineEntityManagerDecorator::__sleep PHP Method

__sleep() public method

Sleep method to unset the PDO connection before serializing the entity manager instance.
public __sleep ( ) : array
return array The array with the properties to serialize
    public function __sleep()
    {
        // query whether we've a wrapped instance
        if ($wrapped = $this->getWrapped()) {
            $wrapped->getConnection()->close();
        }
        // we want to serialize NOTHING
        return array();
    }