private static function findUnsavedChildren(
        $object,
        &$unsavedChildren,
        &$unsavedFiles
    ) {
        static::traverse(true, $object, function ($obj) use (
            &$unsavedChildren,
            &$unsavedFiles
        )
        {
            if ($obj instanceof AVObject)
            {
                if ($obj->_isDirty(false))
                {
                    $unsavedChildren[] = $obj;
                }
            } else if ($obj instanceof AVFile)
            {
                if (!$obj->getURL())
                {
                    $unsavedFiles[] = $obj;
                }
            }

        });
    }
private static function findUnsavedChildren(
        $object,
        &$unsavedChildren,
        &$unsavedFiles
    ) {
        static::traverse(true, $object, function ($obj) use (
            &$unsavedChildren,
            &$unsavedFiles
        )
        {
            if ($obj instanceof AVObject)
            {
                if ($obj->_isDirty(false))
                {
                    $unsavedChildren[] = $obj;
                }
            } else if ($obj instanceof AVFile)
            {
                if (!$obj->getURL())
                {
                    $unsavedFiles[] = $obj;
                }
            }

        });
    }
private static function findUnsavedChildren ( $ object , & $ unsavedChildren , & $ unsavedFiles ) { static :: traverse ( true , $ object , function ( $ obj ) use ( & $ unsavedChildren , & $ unsavedFiles ) { if ( $ obj instanceof AVObject ) { if ( $ obj -> _isDirty ( false ) ) { $ unsavedChildren [ ] = $ obj ; } } else if ( $ obj instanceof AVFile ) { if ( ! $ obj -> getURL ( ) ) { $ unsavedFiles [ ] = $ obj ; } } } ) ; }
Find unsaved children inside an object.

@param AVObject $object Object to search.
@param array &$unsavedChildren Array to populate with children.
@param array &$unsavedFiles Array to populate with files.
Find unsaved children inside an object .