Download the PHP package auntiewarhol/mvcish without Composer

On this page you can find all versions of the php package auntiewarhol/mvcish. 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 mvcish

MVCish

Lightweight MVC-style PHP web application framework


About The Project

This is a super-lightweight (and thus probably feature-poor) MVC framework in the same vein as something like Yii.

It exists because I inherited a large old legacy system that I needed to migrate, update, and replace. I wanted something I could easily hack into place, converting the legacy pages to new mvc-controlled pages in place, as needed, over time.

So this has some capacities to run in multiple different ways at once.

None of this is really documented, because I wrote it for my own use.

It does not have any nifty installer scripts or anything like that. Yet.

And I don't really encourage anyone else to use it. But hey, it's a free world. If you like it, go for it.

I'll try to work on the docs.

(back to top)

Installation

(back to top)

Usage

(here's a few things slurped in from comments. it's a start)

for typical single-point-of-entrance use, your app bootstrap script will be something like:

websiteroot/MyApp/myApp.php

Legacy file-in-place use would work similarly. Go into the legacy file, construct an $MVCish object as above, but instead of Run(), call runController() as described below. Whatever logic the legacy file was doing would then be moved to being done inside the closure being passed to runController.

CONTROLLER ****

we may or may not have a single point of entrance; if we do, we figured out from the url what controller you wanted and ran it. Otherwise, the url took you directly to a php file as usual, and that file calls runController, passing the 'controller' as a closure:

MODEL ****

'Model' is only very loosely coupled; just looks for the requested class, Can configure to auto-prepend part of a namespace. examples:

$user = $MVCish->Model('\Models\UserQuery'); // returns '\Models\UserQuery'
$user = $MVCish->Model('UserQuery');         // same, if 'Models\' configured as MODEL_NAMESPACE

A model_initialize function can be passed in MVCish options to do any setup work needed for the model when MVCish starts. See myApp.php above.

ROADMAP: Updates coming to allow access to multiple models

VIEW ****

Currently defined Views:

if the configured or default templateDirectory is MyApp/MVCish/templates, look for primary controller templates by default in MyApp/MVCish/templates/controllers, while fragments or master tempates may be in MyApp/MVCish/templates/otherdirs.

default does not use a master template, just renders the controller template. but subclasses may wish to define a master template into which the controller html will be inserted.

The client application can use (pre-loaded or autoloadable) subclasses. This allows the application to create a renderClass that prepares template data and/or provides a master template. App can have a subclass for each site section where these things might be different (home pages vs account pages vs admin pages, etc). The class is provided via MVCish->options, so if there's just one, it could be provided in app-config.php, or if there are multiple, then a controller can set the one it uses in Run options. The class may be defined like:

namespace \MyApp\Render;
class Account extends \AuntieWarhol\MVCish\View\Render {
   ...override/add methods as needed to render an Account template
}

and then Controller uses like: $MVCish->Run(function($self){ ...my controller code },[ 'renderClass' => '\MyApp\Render\Account' ]);

ROADMAP: Updates coming to make proper objects of each of the View types, so it will be easier for clients to override / extend the built-in ones, or create new ones.

AUTHORIZATION ****

MVCish doesn't know anything about Authentication/Authorization. but if you set an object on $MVCish->Auth() (see myApp.php above), and that object has an "Authorize" method, we'll call it before running the controller, and pass it anything passed as an 'Authorize' option. The method should return true if authorized. If it returns false, we'll throw an unauthorized exception. Your object can also throw its own \AuntieWarhol\MVCish\Exception if you want to control the messaging (or throw Forbidden instead of Unauthorized, etc)

MyApp/lib/Auth.php

ROADMAP: I don't really think Auth is something the MVC framework should be responsible for, but I can see an argument that an application framework is bigger than just the MVC, and should handle Auth. Will explore possibility of addding plugin capabilities, and maybe creating a PHPAuth (https://github.com/PHPAuth/PHPAuth"php::auth) Plugin. Or making it part of the coming install script, perhaps.

(back to top)

Roadmap

I have been SUPER busy the last couple of weeks, and at this point I believe I've fixed 90% of what I knew to be hacky and/or unfinished. I've got a little work left to do on Models and Views, as mentioned above, but I think that's about it for cleanup and pre-work.

I am about to use this in a second project for the first time, and I'm going to try and use the process to develop an install / build-starter-site script. And improve the docs.

Once I've done those things, I think at that point, this might be ready for public consumption, if anyone is inclined to play with it.

Future stuff, as I mentioned I think a Plugin architechture might be the next step, to add things that I don't think are MVC-framework responsibilities, but might be Application-framework responsibilities. Auth is the first big one, and then maybe HTML builder tools?

(boilerplate) See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

You probably shouldn't be using this, much less contributing to it. But if you insist, I will leave these instructions as provided by this template I'm using, because hey, why not.

--

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/auntiewarhol/mvcish

(back to top)


All versions of mvcish with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
monolog/monolog Version ^1.23
phpmailer/phpmailer Version ^6.0
jeremykendall/php-domain-parser Version ^6.0
symfony/polyfill-intl-idn Version ^1.28
symfony/http-client Version ^6
plasticbrain/php-flash-messages Version ^1.0
vanilla/htmlawed Version ^2.2
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 auntiewarhol/mvcish contains the following files

Loading the files please wait ....