Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRESIDECMS-2161 variable scoping #971

Merged
merged 2 commits into from Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -11,23 +11,23 @@ component extends="coldbox.system.cache.store.indexers.MetadataIndexer" {
}

public any function clear( required any objectKey ) {
return poolMetadata.remove( arguments.objectKey );
return variables.poolMetadata.remove( arguments.objectKey );
}

public any function getKeys() {
return javaCollections.list( poolMetadata.keys() );
return javaCollections.list( variables.poolMetadata.keys() );
}

public any function getObjectMetadata( required any objectKey ) {
return poolMetadata.get( arguments.objectKey );
return variables.poolMetadata.get( arguments.objectKey );
}

public any function setObjectMetadata( required any objectKey, required any metadata ) {
return poolMetadata.put( arguments.objectKey, arguments.metadata );
return variables.poolMetadata.put( arguments.objectKey, arguments.metadata );
}

public any function objectExists( required any objectKey ) {
return poolMetadata.containsKey( arguments.objectKey );
return variables.poolMetadata.containsKey( arguments.objectKey );
}

public any function getObjectMetadataProperty( required any objectKey, required any property ) {
Expand All @@ -45,6 +45,6 @@ component extends="coldbox.system.cache.store.indexers.MetadataIndexer" {
}

public any function getSize() {
return poolMetadata.size();
return variables.poolMetadata.size();
}
}
}
6 changes: 3 additions & 3 deletions system/coldboxModifications/ioc/DelayedInjector.cfc
Expand Up @@ -52,9 +52,9 @@ component {
}

private any function _getInstance() {
return _instance ?: NullValue();
return variables._instance ?: NullValue();
}
private void function _setInstance( required any instance ) {
_instance = arguments.instance;
variables._instance = arguments.instance;
}
}
}