{"id":24716750,"url":"https://github.com/baylorrae/html-class-for-php","last_synced_at":"2025-10-09T13:31:47.333Z","repository":{"id":1214270,"uuid":"1130623","full_name":"BaylorRae/HTML-Class-For-PHP","owner":"BaylorRae","description":"This class is designed to work like jQuery when creating and working with html elements.","archived":false,"fork":false,"pushed_at":"2012-08-28T12:07:14.000Z","size":90,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T02:51:14.527Z","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/BaylorRae.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":"2010-12-02T01:04:55.000Z","updated_at":"2021-05-23T03:09:22.000Z","dependencies_parsed_at":"2022-07-06T12:33:25.473Z","dependency_job_id":null,"html_url":"https://github.com/BaylorRae/HTML-Class-For-PHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaylorRae/HTML-Class-For-PHP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FHTML-Class-For-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FHTML-Class-For-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FHTML-Class-For-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FHTML-Class-For-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaylorRae","download_url":"https://codeload.github.com/BaylorRae/HTML-Class-For-PHP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2FHTML-Class-For-PHP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001484,"owners_count":26083102,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":"2025-01-27T09:14:05.609Z","updated_at":"2025-10-09T13:31:47.048Z","avatar_url":"https://github.com/BaylorRae.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"This class is designed to work like jQuery when creating and working with html elements. Look at `html.class.php` to see a list of all the available methods.\n\n## A few examples\n\n```php\n\u003c?php \n\t\t\n\t// Get the class\n\tinclude 'html.class.php';\n\t\n\t// Create a div and set an attribute\n\t$div = new html('div', array(\n\t\t'class' =\u003e 'text field'\n\t\t));\n\t\t\n\t// Create a label and input\n\t$label = new html('label', array(\n\t\t'for' =\u003e 'title',\n\t\t'text' =\u003e 'Title'\n\t\t));\n\t\t\n\t$input = new html('input', array(\n\t\t'id' =\u003e 'title',\n\t\t'name' =\u003e 'title',\n\t\t'value' =\u003e 'My Awesome Site'\n\t\t));\n\t\t\n\t// Append the label and the input\n\t$div-\u003eappend($label, $input);\n\t\n\t// Or chain the methods\n\t$div-\u003eappend($label)\n\t\t-\u003eappend($input);\n\t\t\n\t// Or append the elements to the div\n\t$label-\u003eappendTo($div);\n\t$input-\u003eappendTo($div);\n\t\n\t// Or clone the div before appending stuff\n\t// This was designed for loops\n\t$tmp_div = $div-\u003e_clone()-\u003eappend($label, $input);\n\t\n\t// Put the div on the page,\n\t// and destory the temporary div\n\techo $tmp_div;\n\tunset($tmp_div);\n\t\n\t\n\t// Whoops, we forgot to add our heading\n\t$heading = new html('h3', array(\n\t\t'text' =\u003e 'Title Field',\n\t\t'class' =\u003e 'field-heading'\n\t\t));\n\t\n\t// Ah, that's better\n\t$div-\u003eprepend($heading);\n\t\n\t// Or\n\t$heading-\u003eprependTo($div);\n\t\n\t// Put the div on the page\n\techo $div;\n?\u003e\n```\t","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fhtml-class-for-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaylorrae%2Fhtml-class-for-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fhtml-class-for-php/lists"}