PHPackages                             optiwariindia/website - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. optiwariindia/website

ActiveProject

optiwariindia/website
=====================

1.0.4(3y ago)064[1 issues](https://github.com/optiwariindia/website/issues)MITPHP

Since Dec 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/optiwariindia/website)[ Packagist](https://packagist.org/packages/optiwariindia/website)[ RSS](/packages/optiwariindia-website/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

website
=======

[](#website)

The concept
-----------

[](#the-concept)

It's a composer based basic boilerplate code for PHP 7/8 development.

Installation
------------

[](#installation)

To install using composer use following command

`composer require optiwariindia/website`

How to use
----------

[](#how-to-use)

### Setup

[](#setup)

Configure setup page for your project. The predefined strucutre checks the required php extensions, apache modules, cofiguration files and email/database connectivity parameters. You can extend setup class as below:

`class setup extends \optiwariindia\website\setup { ... }`

### Config

[](#config)

The config class is designed to store basic configurations of the application. It stores database configuration, email configuration, API Keys, Encryption keys, Integration parameters and other static resources that are not frequently changed and hence cannot be saved into database. You can extend config class as below:

`class config extends \optiwariindia\website\config { ... }`

### Request

[](#request)

This class is designed to handle request parameters like inputs, method, timestamp, url, useragent and action parameters. The class can be extended to use in your project as below:

`class request extends \optiwariindia\website\request {...}`

### Session

[](#session)

This class is designed to manage user's session using PHP Session variables. This class takes care of initialization of session only once in the page, store parameters into your session variable and fetch them whenever required. The class can be extended to use in your project as below:

`class session extends \optiwariindia\website\session {...}`

### View

[](#view)

This class is designed to manage views using twig template engine. Besides twig template engine, it also takes care of JSON outputs and HTML Output as variable. You can extend this class as below:

` class view extends \optiwariindia\website\view {...}`

#### Setup view directory

[](#setup-view-directory)

`view::dir(_path_to_view_directory_);`

#### Render a page

[](#render-a-page)

` view::render(_filename_in_view_directory,Array_of_variables_to_be_parsed)`

#### Read HTML Page into a variable

[](#read-html-page-into-a-variable)

` view::get(_filename_in_view_directory,Array_of_variables_to_be_parsed)`

#### Generate JSON Output for API

[](#generate-json-output-for-api)

` view::api(Array_of_variables_to_be_parsed)`

### Module

[](#module)

This class is created to create plugable modules in your project. This class provides support of basic functions related to database and debugging. This class is dependent on optiwariindia\\database and mysqli extension. You can create plugable modules by extending this class to your module as follows:

`class module1 extends optiwariindia\website\module {...}`

#### Debug option

[](#debug-option)

You can use trace method to dump a variable in json format and stop execution of the code at the point as shown below:

` class module1 extends optiwariindia\website\module {     public function someFunctionName(someParameter){          //Some operation here          self::trace(VariableToBeTraced)     }}`

#### Connecting Database

[](#connecting-database)

You can use init to initalize database within any module and get access to methods select,insert,update,delete and query as shown in example below:

`class module1 extends optiwariindia\website\module {     public function FunctionName($requiredParameters){           $db=self::init();           $info=$db->select(__table__,__fields__,__clauses__);     }}`We welcome suggestions and enhancements. Thanks for you cooperation

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~94 days

Total

5

Last Release

1224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbe7a52e3d1cfef83fb9c467650e5553acb525bd67e0106c222f1444a1797010?d=identicon)[optiwariindia](/maintainers/optiwariindia)

---

Top Contributors

[![optiwariindia](https://avatars.githubusercontent.com/u/4514495?v=4)](https://github.com/optiwariindia "optiwariindia (14 commits)")

### Embed Badge

![Health badge](/badges/optiwariindia-website/health.svg)

```
[![Health](https://phpackages.com/badges/optiwariindia-website/health.svg)](https://phpackages.com/packages/optiwariindia-website)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
