PDepend\Source\AST\ASTCompilationUnit::__sleep PHP Method

__sleep() public method

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.
Since: 0.10.0
public __sleep ( ) : array(string)
return array(string)
    public function __sleep()
    {
        return array('cache', 'childNodes', 'comment', 'endLine', 'fileName', 'startLine', 'id');
    }

Usage Example

 /**
  * testMagicSleepMethodReturnsExpectedSetOfPropertyNames
  * 
  * @return void
  */
 public function testMagicSleepMethodReturnsExpectedSetOfPropertyNames()
 {
     $file = new ASTCompilationUnit(__FILE__);
     $this->assertEquals(array('cache', 'childNodes', 'docComment', 'endLine', 'fileName', 'startLine', 'id'), $file->__sleep());
 }