{"id":15308103,"url":"https://github.com/ivantcholakov/codeigniter-registry","last_synced_at":"2025-04-15T00:54:43.845Z","repository":{"id":12975621,"uuid":"15654257","full_name":"ivantcholakov/codeigniter-registry","owner":"ivantcholakov","description":"Registry library for CodeIgniter","archived":false,"fork":false,"pushed_at":"2015-04-11T06:01:20.000Z","size":148,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T00:54:38.261Z","etag":null,"topics":["codeigniter","php","registry-library"],"latest_commit_sha":null,"homepage":null,"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/ivantcholakov.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}},"created_at":"2014-01-05T16:19:18.000Z","updated_at":"2022-01-08T23:59:11.000Z","dependencies_parsed_at":"2022-09-18T23:11:57.941Z","dependency_job_id":null,"html_url":"https://github.com/ivantcholakov/codeigniter-registry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivantcholakov","download_url":"https://codeload.github.com/ivantcholakov/codeigniter-registry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986279,"owners_count":21194025,"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":["codeigniter","php","registry-library"],"created_at":"2024-10-01T08:13:55.031Z","updated_at":"2025-04-15T00:54:43.829Z","avatar_url":"https://github.com/ivantcholakov.png","language":"PHP","readme":"\nRegistry library for CodeIgniter\n================================\n\nYou may use this library for storing and accessing application-level global data.\nThis library is intended to be compatible with CI 2.x and CI 3.x.\n\nInstallation\n------------\n\nPut the file Registry.php within application/libraries/ folder of your project.\n\nUsage Example\n-------------\n\n```php\n//---------------------------------------------------------------------------\n// Context #1:\n\n$ci = get_instance(); // Use $this instead of $ci inside a controller's method.\n$ci-\u003eload-\u003elibrary('registry'); // You may autoload this library at will.\n\n$title = 'Page Title';\n$subtitle = 'Page Subtitle';\n$metatitle = 'Page Title (Meta)';\n$metadescription = 'Page Description (Meta)';\n$metakeywords = 'page, keywords, meta';\n\n$ci-\u003eregistry\n    // Method chaining is possible.\n    // Set values individually:\n    -\u003eset('page_title', $title)\n    -\u003eset('page_subtitle', $subtitle)\n    // Set multiple values.\n    -\u003eset(compact('metatitle', 'metadescription', 'metakeywords'))\n;\n\nunset($title, $subtitle, $metatitle, $metadescription, $metakeywords);\n\n//---------------------------------------------------------------------------\n// Context #2:\n\n$ci = get_instance();\n$ci-\u003eload-\u003elibrary('registry');\n\n// Get values individually.\n$title = $ci-\u003eregistry-\u003eget('page_title');\n$subtitle = $ci-\u003eregistry-\u003eget('page_subtitle');\n\n// Get multiple values.\nextract($ci-\u003eregistry-\u003eget(array('metatitle', 'metadescription', 'metakeywords')));\n\n// Test:\nvar_dump(compact('title', 'subtitle', 'metatitle', 'metadescription', 'metakeywords'));\n\n//---------------------------------------------------------------------------\n// Also:\n\n// Check whether a particular value is present.\n$test = $ci-\u003eregistry-\u003ehas('test_key');\nvar_dump($test);\n\n// Gets everything from the registry (for debugging purpose).\n$registry = $ci-\u003eregistry-\u003eget_all();\nvar_dump($registry);\n\n// Unset values.\n$ci-\u003eregistry\n    -\u003edelete('page_title')\n    -\u003edelete('page_subtitle')\n    -\u003edelete(array('metatitle', 'metadescription', 'metakeywords'))\n;\nvar_dump($ci-\u003eregistry-\u003eget_all());\n\n// Use destroy method only for testing purposes\n$ci-\u003eregistry-\u003edestroy();\nvar_dump($ci-\u003eregistry-\u003eget_all());\n\n//---------------------------------------------------------------------------\n```\n\nLicense Information\n-------------------\n\nAuthor: Ivan Tcholakov ivantcholakov@gmail.com, 2014-2015.  \nLicense: The MIT License (MIT), http://opensource.org/licenses/MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivantcholakov%2Fcodeigniter-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-registry/lists"}