Last active
December 22, 2015 18:09
-
-
Save johnmccabe/6511444 to your computer and use it in GitHub Desktop.
Accessing var in base from declared type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class foo ( | |
$testvalue = $foo::params::testvalue, | |
) inherits foo::params { | |
foo::somefunc { 'blah': } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class foo::params { | |
$testvalue = "Hello World" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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