{"id":24856670,"url":"https://github.com/secondtruth/synchronizer","last_synced_at":"2025-10-15T01:31:48.475Z","repository":{"id":21761720,"uuid":"25083809","full_name":"secondtruth/synchronizer","owner":"secondtruth","description":"Synchronize all kinds of things","archived":false,"fork":false,"pushed_at":"2017-10-27T19:45:40.000Z","size":36,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-26T12:35:55.893Z","etag":null,"topics":["php-library","synchronizer"],"latest_commit_sha":null,"homepage":"http://www.flamecore.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secondtruth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-11T15:21:28.000Z","updated_at":"2024-06-09T00:15:21.000Z","dependencies_parsed_at":"2022-08-19T22:00:51.240Z","dependency_job_id":null,"html_url":"https://github.com/secondtruth/synchronizer","commit_stats":null,"previous_names":["secondtruth/synchronizer","seabreeze-project/synchronizer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fsynchronizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fsynchronizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fsynchronizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fsynchronizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secondtruth","download_url":"https://codeload.github.com/secondtruth/synchronizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236550278,"owners_count":19167120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php-library","synchronizer"],"created_at":"2025-01-31T16:45:06.147Z","updated_at":"2025-10-15T01:31:43.210Z","avatar_url":"https://github.com/secondtruth.png","language":"PHP","readme":"FlameCore Synchronizer\n======================\n\n[![Latest Stable](http://img.shields.io/packagist/v/flamecore/synchronizer.svg)](https://packagist.org/packages/flamecore/synchronizer)\n[![Scrutinizer](http://img.shields.io/scrutinizer/g/flamecore/synchronizer.svg)](https://scrutinizer-ci.com/g/flamecore/synchronizer)\n[![License](http://img.shields.io/packagist/l/flamecore/synchronizer.svg)](https://packagist.org/packages/flamecore/synchronizer)\n\nThis library makes it easy to synchronize all kinds of things. It features a beautiful and easy to use API.\n\nSynchronizer was developed as backend for our deployment and testing tool [Seabreeze](https://github.com/FlameCore/Seabreeze).\n\n\nImplementations\n---------------\n\nThe Synchronizer library is just an abstract foundation. But concrete implementations are available:\n\n* [FilesSynchronizer](https://github.com/FlameCore/FilesSynchronizer)\n* [DatabaseSynchronizer](https://github.com/FlameCore/DatabaseSynchronizer)\n\n\nUsage\n-----\n\nInclude the vendor autoloader and use the classes:\n\n```php\nnamespace Acme\\MyApplication;\n\n// To create a Synchronizer:\nuse FlameCore\\Synchronizer\\AbstractSynchronizer;\nuse FlameCore\\Synchronizer\\SynchronizerSourceInterface;\nuse FlameCore\\Synchronizer\\SynchronizerTargetInterface;\n\n// To make your project compatible with Synchronizer:\nuse FlameCore\\Synchronizer\\SynchronizerInterface;\n\nrequire 'vendor/autoload.php';\n```\n\nCreate your Synchronizer:\n\n```php\nclass ExampleSynchronizer extends AbstractSynchronizer\n{\n    /**\n     * @param bool $preserve Preserve obsolete objects\n     * @return bool Returns whether the synchronization succeeded.\n     */\n    public function synchronize($preserve = true)\n    {\n        // Do the sync magic\n\n        return true;\n    }\n\n    /**\n     * @param SynchronizerSourceInterface $source The source\n     * @return bool Returns whether the synchronizer supports the source.\n     */\n    public function supportsSource(SynchronizerSourceInterface $source)\n    {\n        return $source instanceof ExampleSource;\n    }\n\n    /**\n     * @param SynchronizerTargetInterface $target The target\n     * @return bool Returns whether the synchronizer supports the target.\n     */\n    public function supportsTarget(SynchronizerTargetInterface $target)\n    {\n        return $target instanceof ExampleTarget;\n    }\n}\n```\n\nCreate your Source and Target:\n\n```php\nclass ExampleSource implements SynchronizerSourceInterface\n{\n    /**\n     * @param array $settings The settings\n     */\n    public function __construct(array $settings)\n    {\n        // Save settings\n    }\n\n    // Your methods...\n}\n\nclass ExampleTarget implements SynchronizerTargetInterface\n{\n    /**\n     * @param array $settings The settings\n     */\n    public function __construct(array $settings)\n    {\n        // Save settings\n    }\n\n    // Your methods...\n}\n```\n\nMake your project compatible with Synchronizer:\n\n```php\nclass Application\n{\n    protected $synchronizer;\n\n    public function setSynchronizer(SynchronizerInterface $synchronizer)\n    {\n        $this-\u003esynchronizer = $synchronizer;\n    }\n\n    // ...\n}\n```\n\n\nInstallation\n------------\n\n### Install via Composer\n\n[Install Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) if you don't already have it present on your system:\n\n    $ curl -sS https://getcomposer.org/installer | php\n\nTo install the library, run the following command and you will get the latest version:\n\n    $ php composer.phar require flamecore/synchronizer\n\n\nRequirements\n------------\n\n* You must have at least PHP version 5.4 installed on your system.\n\n\nContributing\n------------\n\nIf you'd like to contribute, please see the [CONTRIBUTING](CONTRIBUTING.md) file first.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondtruth%2Fsynchronizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecondtruth%2Fsynchronizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondtruth%2Fsynchronizer/lists"}