PHP code example of linkorb / org-sync

1. Go to this page and download the library: Download linkorb/org-sync library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

linkorb / org-sync example snippets


$organization = $this->synchronizationMediator->initialize(
    $targetsArray,
    $organizationArray
);

$this->synchronizationMediator->pushOrganization($organization);

Array
(
    [name] => Organization name
    [users] => Array
        (
            [username] => Array
                (
                    [email] => user@email
                    [displayName] => User Name
                    [avatar] => https://example.com/user_avatar.gif
                    [properties] => Array
                        (
                            [key] => value
                        )
                )
        )
    [groups] => Array
        (
            [group name] => Array
                    [parent] => parent group name
                    [displayName] => Group
                    [avatar] => https://example.com/team_avatar.png
                    [members] => Array
                        (
                            [0] => member1
                            [1] => member2
                        )
                    [properties] => Array
                        (
                            [key] => value
                        )
                    [targets] => Array
                        (
                            [0] => target name
                        )
                )
        )
)

Array
(
    [targetName] => Array
        (
            [type] => targetType
            [baseUrl] => http://172.17.0.1:8080/engine-rest/
        )
)