{"id":16897750,"url":"https://github.com/endroid/asset","last_synced_at":"2025-06-12T19:04:39.612Z","repository":{"id":56900082,"uuid":"128631847","full_name":"endroid/asset","owner":"endroid","description":"Abstraction layer for providing contents from different sources","archived":false,"fork":false,"pushed_at":"2024-10-19T12:37:21.000Z","size":76,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-12T19:04:20.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://endroid.nl/","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/endroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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":"endroid"}},"created_at":"2018-04-08T10:58:56.000Z","updated_at":"2024-10-19T12:21:57.000Z","dependencies_parsed_at":"2023-01-28T01:00:45.942Z","dependency_job_id":"9fe2983d-7c71-4e6b-b7d9-d1bfa53641e6","html_url":"https://github.com/endroid/asset","commit_stats":{"total_commits":93,"total_committers":2,"mean_commits":46.5,"dds":"0.032258064516129004","last_synced_commit":"2b946738f40fc87e1dcc592b8d4fbffbf20970c3"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/endroid/asset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endroid%2Fasset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endroid%2Fasset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endroid%2Fasset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endroid%2Fasset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endroid","download_url":"https://codeload.github.com/endroid/asset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endroid%2Fasset/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259519773,"owners_count":22870364,"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":[],"created_at":"2024-10-13T17:39:39.595Z","updated_at":"2025-06-12T19:04:39.590Z","avatar_url":"https://github.com/endroid.png","language":"PHP","funding_links":["https://github.com/sponsors/endroid"],"categories":[],"sub_categories":[],"readme":"# Asset\n\n*By [endroid](https://endroid.nl/)*\n\n[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/asset.svg)](https://packagist.org/packages/endroid/asset)\n[![Build Status](https://github.com/endroid/asset/workflows/CI/badge.svg)](https://github.com/endroid/asset/actions)\n[![Total Downloads](http://img.shields.io/packagist/dt/endroid/asset.svg)](https://packagist.org/packages/endroid/asset)\n[![License](http://img.shields.io/packagist/l/endroid/asset.svg)](https://packagist.org/packages/endroid/asset)\n\nLibrary for quick and easy asset management.\n\nRead the [blog](https://medium.com/@endroid/pdf-generation-in-symfony-3080702353b)\nfor more information on why I created this library.\n\n* ControllerAsset: generates the string from a controller action and parameters.\n* TemplateAsset: generates the string from a template and parameters.\n* FileAsset: generates the string by loading the contents of a file.\n* UrlAsset: simply contains a string which is returned when requested.\n* DataAsset: simply contains a string which is returned when requested.\n* CacheAsset: wraps any of the above in a cache to optimize performance.\n\nAll implement AssetInterface and provide the method: getData().\n\n## Usage\n\nThe easiest way to work with assets is by letting the factory create assets for\nyou. This allows you to create your assets without worrying about the necessary\ndependencies.\n\n```php\n$dataAsset = $assetFactory-\u003ecreate([\n   'controller' =\u003e CoverController::class,\n   'parameters' =\u003e ['title' =\u003e 'My PDF', 'date' =\u003e new DateTime()],\n   'cache_key' =\u003e 'cover',\n   'cache_expires_after' =\u003e 3600,\n   'cache_clear' =\u003e true, // use to purge any previously cached data\n]);\n```\n\n## Installation\n\nUse [Composer](https://getcomposer.org/) to install the library.\n\n``` bash\n$ composer require endroid/asset\n```\n\nWhen you use Symfony, the [installer](https://github.com/endroid/installer)\nmakes sure that services are automatically wired. If this is not the case you\ncan find the configuration files in the `.install/symfony` folder.\n\n## Versioning\n\nVersion numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible\nchanges will be kept to a minimum but be aware that these can occur. Lock\nyour dependencies for production and test your code when upgrading.\n\n## License\n\nThis bundle is under the MIT license. For the full copyright and license\ninformation please view the LICENSE file that was distributed with this source code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendroid%2Fasset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendroid%2Fasset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendroid%2Fasset/lists"}