Skip to content

Instantly share code, notes, and snippets.

@johnmccabe
Last active December 22, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmccabe/6511444 to your computer and use it in GitHub Desktop.
Save johnmccabe/6511444 to your computer and use it in GitHub Desktop.
Accessing var in base from declared type
class foo (
$testvalue = $foo::params::testvalue,
) inherits foo::params {
foo::somefunc { 'blah': }
}
class foo::params {
$testvalue = "Hello World"
}
define foo:somefunc {
notice('Printing testvalue: $foo::testvalue')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment