{"id":19694575,"url":"https://github.com/vaneves/trilight","last_synced_at":"2026-05-14T15:36:26.009Z","repository":{"id":3023172,"uuid":"4042943","full_name":"vaneves/trilight","owner":"vaneves","description":"Framework PHP WebMethod","archived":false,"fork":false,"pushed_at":"2012-04-16T20:45:33.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T12:42:26.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaneves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-16T16:44:07.000Z","updated_at":"2018-06-04T13:52:41.000Z","dependencies_parsed_at":"2022-08-26T02:32:36.231Z","dependency_job_id":null,"html_url":"https://github.com/vaneves/trilight","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vaneves/trilight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneves%2Ftrilight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneves%2Ftrilight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneves%2Ftrilight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneves%2Ftrilight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaneves","download_url":"https://codeload.github.com/vaneves/trilight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneves%2Ftrilight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33031313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-11T19:23:35.203Z","updated_at":"2026-05-14T15:36:25.992Z","avatar_url":"https://github.com/vaneves.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Trilight é um framework PHP para criação de WebMethod, semelhante ao do .NET. A utilização é feita por meio de classes, na qual seus métodos são instanciados via requisições ajax JSON, na qual retorna um resultado no mesmo formato.\r\n\r\n## Servidor ##\r\nBasta criar uma classe que herda de `WebMethod` e implementar seus métodos. Por exemplo:\r\n\r\n\t\u003c?php\r\n\tclass Example extends WebMethod\r\n\t{\r\n\t\tpublic function hello($name)\r\n\t\t{\r\n\t\t\treturn 'Hi '. $name .', welcome to Trilight!';\r\n\t\t}\r\n\t}\r\n\r\n## Cliente ##\r\nO cliente deve ser implementado com Javascript, as requisições devem ser feitas utilando AJAX + POST + JSON. Um exemplo utilizando jQuery:\r\n\r\n\t$.ajax({\r\n\t\turl: 'http://seusite.com/Example.php/hello',\r\n\t\tdata: JSON.stringify({name: 'Van'}),\r\n\t\ttype: 'POST',\r\n\t\tcontentType: 'json',\r\n\t\tsuccess: function(data) {\r\n\t\t\tconsole.log(data);\r\n\t\t}\r\n\t});\r\n\r\nSe o cliente não obedecer os critérios de requisições POST ou JSON ou não informar os parâmetros necessários, o servidor irá retorna uma mensagem de erro 400 (Bad Request).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaneves%2Ftrilight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaneves%2Ftrilight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaneves%2Ftrilight/lists"}