From 34e4fd0b5aae872344a16267efac847f45108ca7 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Tue, 29 Apr 2008 12:06:25 +0000 Subject: [project @ fpeters@0d.be-20080118215410-d45drghkhvba7822] merged Damien branch; and fixed PHP5 binding to use GLib memory management functions Original author: Frederic Peters Date: 2008-01-18 22:54:10.239000+01:00 --- bindings/php5/examples/get_attributes_from_assertion.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bindings/php5/examples/get_attributes_from_assertion.php (limited to 'bindings/php5/examples') diff --git a/bindings/php5/examples/get_attributes_from_assertion.php b/bindings/php5/examples/get_attributes_from_assertion.php new file mode 100644 index 00000000..3ac48159 --- /dev/null +++ b/bindings/php5/examples/get_attributes_from_assertion.php @@ -0,0 +1,11 @@ +/* Example SP PHP5 code to get attributes from an assertion */ + +foreach ($assertion->attributeStatement[0]->attribute as $attribute) { + if ($attribute->name == LASSO_SAML2_ATTRIBUTE_NAME_EPR) { + continue; + } + echo 'attribute : ' . $attribute->name . "\n"; + foreach ($attribute->attributeValue as $value) { + echo ' value : ' . $value->any[0]->content . "\n"; + } +} -- cgit