I'm not quite sure, what are you trying to get. Snippet you provided gets without problems the storagePid set in constants for your extension, the same as this code from setup.txt
:
plugin.tx_yourext {
persistence {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
}
if you have problems with getting your storagePid with provided snippet also can modify your setup.txt
and make sure that the value will be also propagated into settings
scope:
plugin.tx_yourext {
persistence {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
settings {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
}
then in your controller you can catch it with simpler code:
$myStoragePid = $this->settings['storagePid'];
if it will not work for you that means, you didn't set proper value in Constants
for YourExt and/or didn't cleared the caches in the BE.
BTW: Maybe if you'll be more specific I could send better answer.