PHPackages                             shermanwebdesign/swd - 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. shermanwebdesign/swd

ActiveLibrary

shermanwebdesign/swd
====================

Sherman Web Design

v0.2-alpha(6y ago)070wtfplPHP

Since Aug 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kennstphn/SWD)[ Packagist](https://packagist.org/packages/shermanwebdesign/swd)[ RSS](/packages/shermanwebdesign-swd/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (10)Versions (3)Used By (0)

SWD
===

[](#swd)

Sherman Web Design

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

[](#installation)

composer install coming *soon*

Big Idea
--------

[](#big-idea)

This is the codebase that shermanwebdesign.com uses for new projects. May eventually support sub-packages and modules, but for now releasing as an all-or-nothing.

The core concept is driven by a desire to do anything, and be able to quickly respond to creative ideas without having to massage the idea into a framework's "way of doing things".

### HTTP\_

[](#http_)

To support that, SWD conceptualizes out the following elements of the http request.

#### Request

[](#request)

The Request represents the (real or mocked) request from the client browser, and the response is a container for all output from the application.

> While technically possible to edit the variables within the Request, all implementations must refrain from doing so. New Requests may be created (mocked) for any necessary purposes

#### Response

[](#response)

The Response is a container for all output from the application, and must be used for all output, including environmental state changes (Cookies, Session data, output).

QuickStart
----------

[](#quickstart)

The Website may be initialized with

```
$website = new \SWD\Website\Website(
    \SWD\Request\Request::create(),
    new \SWD\Response\Response()
);

```

Once initialised, simple run the website with

```
$website->run();

```

Controllers
-----------

[](#controllers)

By default, Controller initialization is handled by

```
SWD\DataController\DataControllerFactory

```

and may be overriden via

```
$website->setDataControllerFactory($yourFactoryClass);

```

prior to `$website->run();`

The default DataController uses the url parsing found in `SWD\Request\UrlParser`. If you don't want to override the DataControllerFactory, and just adjust the url parsing, create a `\App\Factories\UrlParserFactory` which has a `create()` method returning an instantiated `SWD\Request\UrlParser_interface`. This will automatically be loaded instead of the default UrlParser for any calls to `SWD\Request\UrlParserFactory::create();`

Modules
-------

[](#modules)

Modules may be a callable function, invokable class, or a string string classname referencing an invokeable class.

### Loading a module

[](#loading-a-module)

Prior to the `$website->run();` call, load the module via one of the following methods;

#### Closure

[](#closure)

```
$website->addModule( $website::FOO_BAR_ETC, function($hookname, \SWD\Website\Website $website){
    //your code here
} );

```

#### Instantiated Class

[](#instantiated-class)

```
$website->addModule( $website::FOO_BAR_ETC, $invokeableObject );

```

#### ClassName

[](#classname)

```
$website->addModule( $website::FOO_BAR_ETC, My\Class\Name::class);

```

### Module callback cycle

[](#module-callback-cycle)

The string classname will be constructed with `SWD\Request\Request_interface` and `SWD\Response\Response_interface` parameters.

```
$module = new $moduleClass( $request, $response);

```

The callable (closure, instantiated invokeable class, etc) will be invoked with a string $hookname and the instantiated `SWD\Website\Website` object.

```
$module( $hookName, $website );

```

CONTROLLERS vs MODULES
----------------------

[](#controllers-vs-modules)

While Modules may be stacked, there should only ever be one DataController hit for the request (unless that controller invokes a subordinate).

While this means DataControllers are technically less powerful, the expectation of SWD is that every response will have a single data value (array of like objects, single object) which is published by the DataController. The meta object is intended for modular output, ideally referenced by a published key, or a dotClass name for the module.

If this expectation is followed, debugging should always be a modular affair, and the callstack for any given bug should be minimal and mockable.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

2456d ago

### Community

Maintainers

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

---

Top Contributors

[![kennstphn](https://avatars.githubusercontent.com/u/600518?v=4)](https://github.com/kennstphn "kennstphn (10 commits)")

### Embed Badge

![Health badge](/badges/shermanwebdesign-swd/health.svg)

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

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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