Download the PHP package shermanwebdesign/swd without Composer

On this page you can find all versions of the php package shermanwebdesign/swd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package swd

SWD

Sherman Web Design

Installation

composer install coming soon

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_

To support that, SWD conceptualizes out the following elements of the http 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

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

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

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 may be a callable function, invokable class, or a string string classname referencing an invokeable class.

Loading a module

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

Closure

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

Instantiated Class

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

ClassName

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

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

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.


All versions of swd with dependencies

PHP Build Version
Package Version
Requires twig/twig Version ^2.4
doctrine/orm Version ^2.5
phpmailer/phpmailer Version ^6.0
curl/curl Version ^1.8
ezyang/htmlpurifier Version ^4.10
php-http/guzzle6-adapter Version ^1.1
gabrielbull/ups-api Version ^0.8.0
vinceg/usps-php-api Version ^1.0
league/iso3166 Version ^2.1
erusev/parsedown Version ^1.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shermanwebdesign/swd contains the following files

Loading the files please wait ...