PDepend\Source\AST\AbstractASTType::__sleep PHP Метод

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

The magic sleep method is called by the PHP runtime environment before an instance of this class gets serialized. It returns an array with the names of all those properties that should be cached for this class or interface instance.
public __sleep ( ) : array
Результат array
    public function __sleep()
    {
        if (is_array($this->methods)) {
            $this->cache->type('methods')->store($this->id, $this->methods);
            $this->methods = null;
        }
        return array('cache', 'context', 'comment', 'endLine', 'modifiers', 'name', 'nodes', 'namespaceName', 'startLine', 'userDefined', 'id');
    }

Usage Example

 /**
  * The magic sleep method is called by the PHP runtime environment before an
  * instance of this class gets serialized. It returns an array with the
  * names of all those properties that should be cached for this class or
  * interface instance.
  *
  * @return array
  * @since  0.10.0
  */
 public function __sleep()
 {
     return array_merge(array('constants', 'interfaceReferences', 'parentClassReference'), parent::__sleep());
 }