__sleep() 공개 메소드

The magic sleep method will be called by PHP's runtime environment right before it serializes an instance of this class. This method returns an array with those property names that should be serialized.
부터: 0.10.0
public __sleep ( ) : array(string)
리턴 array(string)
 /**
  * testMagicSleepMethodReturnsExpectedSetOfPropertyNames
  * 
  * @return void
  */
 public function testMagicSleepMethodReturnsExpectedSetOfPropertyNames()
 {
     $file = new ASTCompilationUnit(__FILE__);
     $this->assertEquals(array('cache', 'childNodes', 'docComment', 'endLine', 'fileName', 'startLine', 'id'), $file->__sleep());
 }