@@ 759-774 (lines=16) @@ | ||
756 | * |
|
757 | * @return array |
|
758 | */ |
|
759 | public function prepareAuthentications(\stdClass $data) |
|
760 | { |
|
761 | $authentications = array(); |
|
762 | if (isset($data->authentications)) { |
|
763 | foreach ($data->authentications as $authentication) { |
|
764 | $authenticationType = $authentication->uri; |
|
765 | // get all params |
|
766 | $params = get_object_vars($authentication); |
|
767 | // remove type |
|
768 | unset($params["uri"]); |
|
769 | // set all authentication information's |
|
770 | $authentications[$authenticationType] = $params; |
|
771 | } |
|
772 | } |
|
773 | return $authentications; |
|
774 | } |
|
775 | ||
776 | /** |
|
777 | * Prepares the access array based on a data object |
|
@@ 783-798 (lines=16) @@ | ||
780 | * |
|
781 | * @return array |
|
782 | */ |
|
783 | public function prepareAccesses(\stdClass $data) |
|
784 | { |
|
785 | $accesses = array(); |
|
786 | if (isset($data->accesses)) { |
|
787 | foreach ($data->accesses as $access) { |
|
788 | $accessType = $access->type; |
|
789 | // get all params |
|
790 | $params = get_object_vars($access); |
|
791 | // remove type |
|
792 | unset($params["type"]); |
|
793 | // set all accesses information's |
|
794 | $accesses[$accessType][] = $params; |
|
795 | } |
|
796 | } |
|
797 | return $accesses; |
|
798 | } |
|
799 | ||
800 | /** |
|
801 | * Prepares the analytics array based on a data object |