{"id":37268689,"url":"https://github.com/arbor-education/sis-sdk-php","last_synced_at":"2026-04-01T17:25:52.822Z","repository":{"id":19590293,"uuid":"87416109","full_name":"arbor-education/sis-sdk-php","owner":"arbor-education","description":"Arbor Education PHP SDK","archived":false,"fork":false,"pushed_at":"2026-04-01T11:43:55.000Z","size":2171,"stargazers_count":11,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-01T13:31:02.963Z","etag":null,"topics":["rest-api","sdk","sis"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/arbor-education.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-06T10:18:47.000Z","updated_at":"2026-04-01T11:43:19.000Z","dependencies_parsed_at":"2024-07-16T13:05:28.162Z","dependency_job_id":"3b15df98-c7b4-4ead-aeda-be0d5c2c8e02","html_url":"https://github.com/arbor-education/sis-sdk-php","commit_stats":{"total_commits":103,"total_committers":26,"mean_commits":"3.9615384615384617","dds":0.8058252427184466,"last_synced_commit":"c5e481a3f17dad4d8a97b6047c9d4ae06c49b4be"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/arbor-education/sis-sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arbor-education%2Fsis-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arbor-education%2Fsis-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arbor-education%2Fsis-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arbor-education%2Fsis-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arbor-education","download_url":"https://codeload.github.com/arbor-education/sis-sdk-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arbor-education%2Fsis-sdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["rest-api","sdk","sis"],"created_at":"2026-01-16T00:37:39.926Z","updated_at":"2026-04-01T17:25:52.808Z","avatar_url":"https://github.com/arbor-education.png","language":"PHP","readme":"# Arbor SDK\n\nArbor Education SDK library.\n\n## Introduction\n\nPHP SDK is a library which simplifies the process of integrating the Arbor REST API with your own software.\n\nRather than handling XML and making HTTP requests in your code, you can simply include the SDK and use getters and setters on models in order to access data from Arbor. PHP SDK includes hundreds of models as well as a gateway pattern for querying the API via a query model.\n\nSDK supports and requires any PSR 18 based HTTP client. Make sure to install one prior to using the SDK.\n\n\n## Requirements\n\n* PHP 8.1 or higher\n* [Composer](https://getcomposer.org/download)\n\n## Installation\n\nSimply download the project and run `composer install` from the root of the project to use as standalone for testing purposes. \n\nFind the latest version on Packagist [Arbor Education - PHP SDK](https://packagist.org/packages/arbor-education/arbor-sdk-php)  and install it with composer directly in your project `composer require arbor-education/arbor-sdk-php`\n\nOnce setup use the `examples/config-dist.php` to create your own config. For this you will need your apps credentials added on [Arbor Education - Developers Portal](https://developers-portal.arbor.sc) in order to be able to make requests to a sandbox environment. \n\n## Usage\n\nThe `PsrRestGateway` class is a gateway implementation for interacting with REST APIs using PSR-compliant HTTP clients. It provides methods for CRUD operations, bulk creation, querying, and handling API responses.\n\nIn the `examples/example-bootstrap` you will find the configuration needed to make requests, either using it directly from `examples/config.php` or using your own configuration. The entire `examples` directory is focused on helping you develop your app faster. Scripts written represent some of the most frequently used queries.\n\n## Example\n\nWhen initializing the `PsrRestGateway` you will need to pass the `Arbor\\Api\\Gateway\\HttpClient\\HttpClientInterface`.\n\n```php\n$httpClient = new \\Arbor\\Api\\Gateway\\HttpClient\\HttpClient(\n    new \\Arbor\\Api\\Gateway\\HttpClient\\TypedRequestFactory(),\n    null,\n    null,\n    $config['api']['baseUrl'],\n    $config['api']['auth']['user'],\n    $config['api']['auth']['password']\n);\n\n$api = new \\Arbor\\Api\\Gateway\\PsrRestGateway(\n    $httpClient,\n    new \\Arbor\\Model\\Hydrator(),\n    new \\Arbor\\Filter\\CamelCaseToDash(),\n    new \\Arbor\\Filter\\PluralizeFilter(),\n);\n```\nThis will create a new instance of the `PsrRestGateway` which you can use to interact with the Arbor API. It will try to find any existing installed PSR-18 HTTP client, or you can pass your own implementation of `Psr\\Http\\Client\\ClientInterface` to the `HttpClient` class.\n\nThis will set the default gateway for all models, allowing you to use the SDK without needing to pass the gateway instance every time you want to retrieve or manipulate a model.\n```php\n\\Arbor\\Model\\ModelBase::setDefaultGateway($api);\n```\nUse `Arbor\\Api\\Gateway\\PsrRestGateway` to make GET, POST, PUT and DELETE requests and use `Arbor\\Query\\Query` to add filters to your requests.\n\n#### Multipart upload request\n\nUse the `upload()` method to submit files as `multipart/form-data`.\n\n```php\nuse Arbor\\Api\\Gateway\\UploadFile;\n\n$fileContent = file_get_contents('/path/to/document.pdf');\n\n$response = $api-\u003eupload(\n    '/rest-v2/documents/upload',\n    new UploadFile(name: 'file', contents: $fileContent, filename: 'document.pdf')\n);\n```\n\nFor large files, pass a PSR-7 stream to avoid loading the entire file into memory:\n\n```php\n// $streamFactory can be any PSR-17 StreamFactoryInterface implementation\n$stream = $streamFactory-\u003ecreateStreamFromFile('/path/to/large-video.mp4');\n\n$response = $api-\u003eupload(\n    '/rest-v2/documents/upload',\n    new UploadFile(name: 'file', contents: $stream, filename: 'large-video.mp4')\n);\n```\n\n#### GET request:\n```php\n$student = \\Arbor\\Model\\Student::retrieve(16);\n```\nor use [examples/student-retrieve.php](https://github.com/arbor-education/sis-sdk-php/blob/master/examples/student-retrieve.php) to see how to retrieve a record.\n\n#### POST request:\n\nuse [examples/staff-create.php](https://github.com/arbor-education/sis-sdk-php/blob/master/examples/staff-create.php) to see how to create a new record.\n\n#### PUT request: \n\nuse [examples/staff-create.php](https://github.com/arbor-education/sis-sdk-php/blob/master/examples/staff-update.php) to see how to update an existing record.\n\n#### DELETE request:\n\n```php\n$api-\u003edelete($staff-\u003egetPerson()); // assuming that you are deleting your newly created staff record\n```\n\n#### Query filters: \nList of filters can be found in `Arbor\\Query\\Query`\n\n```php\n$query = new \\Arbor\\Query\\Query(Arbor\\Resource\\ResourceType::ARBOR_MODEL);\n$query-\u003eaddPropertyFilter(ArborModel::PROPERTY_NAME, OPERATOR, $value);\n$query-\u003eaddPropertyFilter(ArborModel::PROPERTY_NAME, SECOND_OPERATOR, $value);\n... \n\n$records = \\Arbor\\Model\\ArborModel::query($query); // will return an array of records\n\nforeach ($records as $record) {\n    // e.g. $record-\u003egetDisplayName();\n}\n```\nCheck `examples` directory to see usages of filters.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farbor-education%2Fsis-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farbor-education%2Fsis-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farbor-education%2Fsis-sdk-php/lists"}