{"id":21013409,"url":"https://github.com/heavenshell/php-silex-zf-db","last_synced_at":"2025-04-24T03:13:23.123Z","repository":{"id":62515338,"uuid":"1779273","full_name":"heavenshell/php-silex-zf-db","owner":"heavenshell","description":"Silex Zend_Db extension","archived":false,"fork":false,"pushed_at":"2016-09-21T15:37:14.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T03:13:18.467Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heavenshell.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-21T02:21:31.000Z","updated_at":"2016-09-21T15:37:15.000Z","dependencies_parsed_at":"2022-11-02T13:30:44.097Z","dependency_job_id":null,"html_url":"https://github.com/heavenshell/php-silex-zf-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fphp-silex-zf-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fphp-silex-zf-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fphp-silex-zf-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fphp-silex-zf-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heavenshell","download_url":"https://codeload.github.com/heavenshell/php-silex-zf-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552075,"owners_count":21449165,"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-11-19T09:42:18.142Z","updated_at":"2025-04-24T03:13:23.102Z","avatar_url":"https://github.com/heavenshell.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Silex Zend_Db extension.\n\nThis extension is for the Silex microframework enables use Zend Framework's Zend_Db.\n\n    \u003c?php\n    require_once 'silex.phar';\n    require_once dirname(__DIR__) . '/src/Zf1/DbExtension.php';\n\n    $zendpath = getenv('ZF_PATH');\n\n    $app = new Silex\\Application();\n    $app-\u003eregister(new \\Zf1\\DbExtension(), array(\n        'zend.class_path' =\u003e $zendpath,\n        'zend.db.adapter' =\u003e 'Pdo_Sqlite',\n        'zend.db.options' =\u003e array(\n            'dbname' =\u003e __DIR__ . '/test.db',\n        )\n    ));\n\n    $app-\u003ebefore(function() use ($app) {\n        $db    = $app['zend.db']();\n        $conn  = $db-\u003egetConnection();\n        $app['zend.db.connection'] = $conn;\n\n        // When you use Model class, add to namespace.\n        // If you not using namespace, use registerPrefix() instead.\n        $app['autoloader']-\u003eregisterNamespace('Model', __DIR__);\n    });\n\n    $app-\u003eget('/create', function () use ($app) {\n        $db = $app['zend.db']();\n        $db-\u003einsert(\n            'entries', array('title' =\u003e 'test_title', 'text' =\u003e 'test_text')\n        );\n        $table = new \\Model\\Entries();\n        $row   = $table-\u003efetchAll();\n        return json_encode($row-\u003etoArray());\n    });\n\nSet Zend Framework1 library to your include_path\n- Running examples\n  Add SetEnv ZF_PATH /Path/To/include_path to .htaccess\n- Running tests\n  export ZF_PATH=/Path/To/include_path\n\nSee more detail http://framework.zend.com/manual/en/zend.db.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavenshell%2Fphp-silex-zf-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheavenshell%2Fphp-silex-zf-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavenshell%2Fphp-silex-zf-db/lists"}