{"id":15034180,"url":"https://github.com/phpdocumentor/reflectiondocblock","last_synced_at":"2025-09-09T20:56:27.296Z","repository":{"id":2939593,"uuid":"3951767","full_name":"phpDocumentor/ReflectionDocBlock","owner":"phpDocumentor","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-21T07:16:29.000Z","size":1329,"stargazers_count":9374,"open_issues_count":10,"forks_count":125,"subscribers_count":18,"default_branch":"5.x","last_synced_at":"2025-05-12T16:20:32.998Z","etag":null,"topics":["docblocks"],"latest_commit_sha":null,"homepage":"","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/phpDocumentor.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},"funding":{"github":"phpDocumentor"}},"created_at":"2012-04-06T17:17:37.000Z","updated_at":"2025-05-11T00:52:03.000Z","dependencies_parsed_at":"2024-04-11T17:40:49.024Z","dependency_job_id":"526778c5-3c04-4749-9f6d-09b67fa6cf9e","html_url":"https://github.com/phpDocumentor/ReflectionDocBlock","commit_stats":{"total_commits":573,"total_committers":63,"mean_commits":9.095238095238095,"dds":0.7818499127399651,"last_synced_commit":"60741fe3871f40e44ca10a28ce85d08b7ed841cd"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FReflectionDocBlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FReflectionDocBlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FReflectionDocBlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpDocumentor%2FReflectionDocBlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpDocumentor","download_url":"https://codeload.github.com/phpDocumentor/ReflectionDocBlock/tar.gz/refs/heads/5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774593,"owners_count":21962199,"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":["docblocks"],"created_at":"2024-09-24T20:24:09.925Z","updated_at":"2025-05-12T16:21:07.587Z","avatar_url":"https://github.com/phpDocumentor.png","language":"PHP","funding_links":["https://github.com/sponsors/phpDocumentor"],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Integrate](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml/badge.svg)](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml)\n[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master)\n[![Stable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg?label=stable)](https://packagist.org/packages/phpdocumentor/reflection-docblock)\n[![Unstable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg?include_prereleases\u0026label=unstable)](https://packagist.org/packages/phpdocumentor/reflection-docblock)\n\nReflectionDocBlock \n==================\n\nIntroduction\n------------\n\nThe ReflectionDocBlock component of phpDocumentor provides a DocBlock parser\nthat is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest).\n\nWith this component, a library can provide support for annotations via DocBlocks\nor otherwise retrieve information that is embedded in a DocBlock.\n\nInstallation\n------------\n\n```bash\ncomposer require phpdocumentor/reflection-docblock\n```\n\nUsage\n-----\n\nIn order to parse the DocBlock one needs a DocBlockFactory that can be\ninstantiated using its `createInstance` factory method like this:\n\n```php\n$factory  = \\phpDocumentor\\Reflection\\DocBlockFactory::createInstance();\n```\n\nThen we can use the `create` method of the factory to interpret the DocBlock.\nPlease note that it is also possible to provide a class that has the\n`getDocComment()` method, such as an object of type `ReflectionClass`, the\ncreate method will read that if it exists.\n\n```php\n$docComment = \u003c\u003c\u003cDOCCOMMENT\n/**\n * This is an example of a summary.\n *\n * This is a Description. A Summary and Description are separated by either\n * two subsequent newlines (thus a whiteline in between as can be seen in this\n * example), or when the Summary ends with a dot (`.`) and some form of\n * whitespace.\n */\nDOCCOMMENT;\n\n$docblock = $factory-\u003ecreate($docComment);\n```\n\nThe `create` method will yield an object of type `\\phpDocumentor\\Reflection\\DocBlock`\nwhose methods can be queried:\n\n```php\n// Contains the summary for this DocBlock\n$summary = $docblock-\u003egetSummary();\n\n// Contains \\phpDocumentor\\Reflection\\DocBlock\\Description object\n$description = $docblock-\u003egetDescription();\n\n// You can either cast it to string\n$description = (string) $docblock-\u003egetDescription();\n\n// Or use the render method to get a string representation of the Description.\n$description = $docblock-\u003egetDescription()-\u003erender();\n```\n\n\u003e For more examples it would be best to review the scripts in the [`/examples` folder](/examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpdocumentor%2Freflectiondocblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpdocumentor%2Freflectiondocblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpdocumentor%2Freflectiondocblock/lists"}