Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (160) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2015-12-04 (10 months ago) | Not enough user ratings | Total: 172 | All time: 8,026 This week: 1,109 |
Version | License | PHP version | Categories | |||
mpstyle_mtoolkit 0.1 | GNU Lesser Genera... | 5.3 | PHP 5, Libraries, Design Patterns |
Description | Author | |||||||||||||
This package is a PHP Web application framework that supports MVC. |
|
MToolkit is a simple PHP toolkit, it is compliant with the PSR-0 Standard: - A fully-qualified namespace and class must have the following structure \\\<Vendor Name>\\\(\<Namespace\>)*\\\<Class Name>. - Each namespace must have a top-level namespace ("Vendor Name"). (Missing) - Each namespace can have as many sub-namespaces as it wishes. - Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system. - Each underscore in the class name is converted to a DIRECTORY_SEPARATOR. The underscore has no special meaning in the namespace. - The fully-qualified namespace and class is suffixed with .php when loading from the file system. - Alphabetic characters in vendor names, namespaces, and class names may be of any combination of lower case and upper case.
It borns from a requirement: develop a website quickly and powerfully.
I know, someone can says "Use Zend Framwork, CakePHP!", but I could answer: "They are very good toolkits, but they aren't the toolkit that I want!" :P
The development model of MToolkit is rolling release. I search some people (developer or not) to increase and modify this strategy: my goal is to manage the versioning of this framework.
The experiences with other toolkit in different platforms have led to create this toolkit.
MToolkit borns like a mash-up of two frameworks: .NET and Qt. o_O
Yes, the framework of the evil and the desktop framework for excellence.
Like Qt, MToolkit has a lot of components, one for every type of usage. Here the list: - Core - Network - Model/Sql - Controller - View
Create a folder for your project.
Download the latest version of MToolkit in the project folder.
On the root of your project create a new file (Settings.php) with this content:
<?php
require_once __DIR__.'/MToolkit/Core/MCore.php';
use MToolkit\Core\MApplication;
class Settings
{
public static function run()
{
// Set the root path of the project
MApplication::setApplicationDirPath(__DIR__);
}
}
Settings::run();
This file sets the root of your project and now you no longer have to use require, require_once, include, include_once directives.
This file must be include in every entry page of your project.
An entry page is the page loaded at start time. Now, we will see how create the controller of the entry page and his html code.
Controller (Index.php):
<?php
require_once __DIR__ . '/Settings.php';
use \MToolkit\Controller\MAbstractPageController;
class Index extends MAbstractPageController
{
private $masterPage;
public function __construct()
{
parent::__construct(__DIR__.'/Index.view');
}
public function helloWorld()
{
return "Hello World";
}
}
And the view file. Every view file must contains the meta tag, with the correct content-type:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Index.view:
<?php /@var $this Index/ ?>
<html>
<head>
<title>Entry page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<b><?php echo $this->helloWorld(); ?></b>
</body>
</html>
composer.json:
{
"require": {
"mpstyle/mtoolkit": "dev-master"
}
}
On the root of your project create a new file (Settings.php) with this content:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use MToolkit\Core\MApplication;
class Settings
{
public static function run()
{
// Set the root path of the project
MApplication::setApplicationDirPath(__DIR__);
}
}
Settings::run();
And now you can create your web app.
Files |
File | Role | Description | ||
---|---|---|---|---|
Controller (9 files) | ||||
Core (24 files, 7 directories) | ||||
DebugConsole (8 files, 4 directories) | ||||
Model (5 files, 1 directory) | ||||
nbproject (2 files, 1 directory) | ||||
Network (5 files, 2 directories) | ||||
UnitTest (1 file, 1 directory) | ||||
User (1 file) | ||||
View (3 files, 2 directories) | ||||
composer.json | Data | Auxiliary data | ||
index.html | Data | Empty document | ||
README.md | Doc. | Documentation |
Files | / | Controller |
File | Role | Description |
---|---|---|
MAbstractController.php | Class | Class source |
MAbstractHttpHandler.php | Class | Class source |
MAbstractMasterPageController.php | Class | Class source |
MAbstractPageController.php | Class | Class source |
MAbstractViewController.php | Class | Class source |
MDropDownList.php | Class | Class source |
MHttpResponse.php | Class | Class source |
MRepeaterView.php | Class | Class source |
README.md | Data | Auxiliary data |
Files | / | Core |
File | Role | Description | ||
---|---|---|---|---|
Cache (5 files) | ||||
DateTime (3 files) | ||||
Enum (6 files) | ||||
Exception (8 files) | ||||
Json (2 files) | ||||
MDir (2 files) | ||||
MFileDevice (1 file) | ||||
index.html | Data | Empty document | ||
MAbstractTemplate.php | Class | Class source | ||
MApplication.php | Class | Class source | ||
MCore.php | Class | Class source | ||
MCoreApplication.php | Class | Class source | ||
MDataType.php | Class | Class source | ||
MDir.php | Class | Class source | ||
MFileInfo.php | Class | Class source | ||
MFileInfoList.php | Class | Class source | ||
MGet.php | Class | Class source | ||
MGlobal.php | Class | Class source | ||
MHash.php | Class | Class source | ||
MList.php | Class | Class source | ||
MLog.php | Class | Class source | ||
MMap.php | Class | Class source | ||
MMobileDetector.php | Class | Class source | ||
MObject.php | Class | Class source | ||
MPost.php | Class | Class source | ||
MString.php | Class | Class source | ||
MStringList.php | Class | Class source | ||
MThread.php | Class | Class source | ||
MTime.php | Class | Class source | ||
MTranslator.php | Class | Class source | ||
MVector.php | Class | Class source |
Files | / | Core | / | Cache |
File | Role | Description |
---|---|---|
MAbstractCache.php | Class | Class source |
MAPCCache.php | Class | Class source |
MFileCache.php | Class | Class source |
MMySQLCache.php | Class | Class source |
MSQLiteCache.php | Class | Class source |
Files | / | Core | / | DateTime |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
TimeInMilliseconds.php | Class | Class source |
TimeInSeconds.php | Class | Class source |
Files | / | Core | / | Enum |
File | Role | Description |
---|---|---|
AspectRatioMode.php | Class | Class source |
CaseSensitivity.php | Class | Class source |
ContentType.php | Class | Class source |
HashAlgorithm.php | Class | Class source |
index.html | Data | Empty document |
Orientation.php | Class | Class source |
Files | / | Core | / | Exception |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
MArgumentOutOfRangeException.php | Class | Class source |
MElementIdNotFoundException.php | Class | Class |
MReadOnlyObjectException.php | Class | Class source |
MTemplateNotFoundException.php | Class | Class source |
MThreadException.php | Class | Class source |
MTranslationFilePa...tFoundException.php | Class | Class source |
MWrongTypeException.php | Class | Class source |
Files | / | Core | / | Json |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
MJsonObject.php | Class | Class source |
Files | / | Core | / | MDir |
File | Role | Description |
---|---|---|
Filter.php | Class | Class source |
SortFlag.php | Class | Class source |
Files | / | DebugConsole |
File | Role | Description | ||
---|---|---|---|---|
Images (3 files) | ||||
Javascripts (1 file) | ||||
Languages (2 files) | ||||
MasterPages (2 files) | ||||
index.html | Data | Empty document | ||
Index.php | Appl. | Application script | ||
Index.view.php | Appl. | Application script | ||
Log.php | Class | Class source | ||
Log.view.php | Appl. | Application script | ||
QuickStart.php | Class | Class source | ||
QuickStart.view.php | Class | Class source | ||
Settings.php | Class | Class source |
Files | / | DebugConsole | / | Images |
File | Role | Description |
---|---|---|
BigLogo.png | Data | Auxiliary data |
MediumLogo.png | Data | Auxiliary data |
SmallLogo.png | Icon | Icon image |
Files | / | DebugConsole | / | Languages |
File | Role | Description |
---|---|---|
en-en.json | Data | Auxiliary data |
Languages.php | Class | Class source |
Files | / | DebugConsole | / | MasterPages |
File | Role | Description |
---|---|---|
MainMasterPage.php | Class | Class source |
MainMasterPage.view.php | Appl. | Application script |
Files | / | Model |
File | Role | Description | ||
---|---|---|---|---|
Sql (11 files) | ||||
index.html | Data | Empty document | ||
MAbstractDataModel.php | Class | Class source | ||
MFileSystemModel.php | Class | Class source | ||
MListModel.php | Class | Class source | ||
MTableModel.php | Class | Class source |
Files | / | Model | / | Sql |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
MAbstractSqlQuery.php | Class | Class source |
MAbstractSqlResult.php | Class | Class source |
MDbConnection.php | Class | Class source |
MPDOQuery.php | Class | Class source |
MPDOResult.php | Class | Class source |
MSql.php | Class | Class source |
MSqlError.php | Class | Class source |
MSqlField.php | Class | Class source |
MSqlQueryModel.php | Class | Class source |
MSqlRecord.php | Class | Class source |
Files | / | nbproject |
File | Role | Description | ||
---|---|---|---|---|
private (1 file) | ||||
project.properties | Data | Auxiliary data | ||
project.xml | Data | Auxiliary data |
Files | / | Network |
File | Role | Description | ||
---|---|---|---|---|
HTTP (3 files) | ||||
RPC (4 files, 1 directory) | ||||
index.html | Data | Empty document | ||
MNetworkCookie.php | Class | Class source | ||
MNetworkRequest.php | Class | Class source | ||
MNetworkSession.php | Class | Class source | ||
MUrl.php | Class | Class source |
Files | / | Network | / | HTTP |
File | Role | Description |
---|---|---|
MHttpHeaders.php | Class | Class source |
MHttpRequest.php | Class | Class source |
MHttpResponse.php | Class | Class source |
Files | / | Network | / | RPC |
File | Role | Description | ||
---|---|---|---|---|
Json (5 files, 2 directories) | ||||
index.html | Data | Empty document | ||
MRPCError.php | Class | Class source | ||
MRPCRequest.php | Class | Class source | ||
MRPCResponse.php | Class | Class source |
Files | / | Network | / | RPC | / | Json |
File | Role | Description | ||
---|---|---|---|---|
Client (3 files) | ||||
Server (3 files) | ||||
index.html | Data | Empty document | ||
MRPCJson.php | Class | Class source | ||
MRPCJsonError.php | Class | Class source | ||
MRPCJsonRequest.php | Class | Class source | ||
MRPCJsonResponse.php | Class | Class source |
Files | / | Network | / | RPC | / | Json | / | Client |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
MRPCJsonClient.php | Class | Class source |
MRPCJsonClientException.php | Class | Class source |
Files | / | Network | / | RPC | / | Json | / | Server |
File | Role | Description |
---|---|---|
index.html | Data | Empty document |
MRPCJsonException.php | Class | Class source |
MRPCJsonWebService.php | Class | Class source |
Files | / | UnitTest | / | Core |
File | Role | Description |
---|---|---|
MAbstractTemplateTest.php | Class | Class source |
MCoreApplicationTest.php | Class | Class source |
MDataTypeTest.php | Class | Class source |
MListTest.php | Class | Class source |
Files | / | View |
File | Role | Description | ||
---|---|---|---|---|
Javascripts (4 files) | ||||
QueryPath (10 files, 2 directories) | ||||
index.html | Data | Empty document | ||
MImage.php | Class | Class source | ||
QueryPath.php | Class | Class source |
Files | / | View | / | Javascripts |
File | Role | Description |
---|---|---|
MQueryString.js | Data | Auxiliary data |
MQueryString.min.js | Data | Auxiliary data |
MString.js | Data | Auxiliary data |
MString.min.js | Data | Auxiliary data |
Files | / | View | / | QueryPath |
File | Role | Description | ||
---|---|---|---|---|
CSS (12 files, 1 directory) | ||||
Extension (2 files) | ||||
DOMQuery.php | Class | Class source | ||
Entities.php | Class | Class source | ||
Exception.php | Class | Class source | ||
Extension.php | Class | Class source | ||
ExtensionRegistry.php | Class | Class source | ||
IOException.php | Class | Class source | ||
Options.php | Class | Class source | ||
ParseException.php | Class | Class source | ||
Query.php | Class | Class source | ||
QueryPathIterator.php | Class | Class source |
Files | / | View | / | QueryPath | / | CSS |
File | Role | Description | ||
---|---|---|---|---|
DOMTraverser (2 files) | ||||
DOMTraverser.php | Class | Class source | ||
EventHandler.php | Class | Class source | ||
InputStream.php | Class | Class source | ||
NotImplementedException.php | Class | Class source | ||
ParseException.php | Class | Class source | ||
Parser.php | Class | Class source | ||
QueryPathEventHandler.php | Class | Class source | ||
Scanner.php | Class | Class source | ||
Selector.php | Class | Class source | ||
SimpleSelector.php | Class | Class source | ||
Token.php | Class | Class source | ||
Traverser.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.