PHPackages                             enimiste/prado-project-starter - 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. [Framework](/categories/framework)
4. /
5. enimiste/prado-project-starter

ActiveProject[Framework](/categories/framework)

enimiste/prado-project-starter
==============================

A starter project for building web site

v3.2.0(9y ago)224MIT

Since Aug 26Compare

[ Source](https://github.com/enimiste/prado-project-starter)[ Packagist](https://packagist.org/packages/enimiste/prado-project-starter)[ RSS](/packages/enimiste-prado-project-starter/feed)WikiDiscussions Synced 2w ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Prado Starter Project
=====================

[](#prado-starter-project)

A Project skeleton to build [PRADO Framework](http://www.pradoframework.net/site/) based web application.
*Prado3 is a Component Framework for PHP 5 (Like ASP .NET dose for C#).*

[![Join the chat at https://gitter.im/prado-project-starter/Lobby](https://camo.githubusercontent.com/2d50c8a39327ab3faab9483d577c55fe1537a5fe992a311bae238689d9bf1712/68747470733a2f2f6261646765732e6769747465722e696d2f707261646f2d70726f6a6563742d737461727465722f4c6f6262792e737667)](https://gitter.im/prado-project-starter/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Pre-requisites :
----------------

[](#pre-requisites-)

- php : &gt;=5.3.3
- ext-ctype
- ext-dom
- ext-json
- ext-pcre
- ext-spl

Installation :
--------------

[](#installation-)

Firstly run this command :

```
$ cd path/to/web/server/www
$ composer create-project enimiste/prado-project-starter project_name
```

If all goes right open the new project in your favorite IDE. (ex: [PhpStorm](https://www.jetbrains.com/phpstorm/))

### Setup the Database schema and data :

[](#setup-the-database-schema-and-data-)

You can use many types of database as it is supported by [PDO Driver](http://php.net/manual/en/pdo.drivers.php).
In this section i will focus on two database types : **Sqlite** and **Mysql**.

- **Sqlite** :
    - Prequisites :
        - Installing Sqlite3 from [Sqlite3](https://www.sqlite.org/).
        - Enabling PHP Sqlite extension on `php.ini` file
    - The project is bundled with the database file located under `protected/data/app.db`.
    - This database is seeded with the needed data. So it is ready to use for next steps.
- **Mysql** :
    You have two options : *Mysql* extension or *Mysqli* extension
    So you should be sure that the desired extension is enabled in `php.ini` file before using it.
    1. Open the `protected/config.database.xml` file.
    2. Comment the sqlite config :

        ```

        ```
    3. Uncomment the Mysql config (mysql or mysqli) :

        ```

        ```
    4. Create an empty database named as `;dbname=` in the step 3.
    5. Update **host**, **username** and **password** with the correct ones.
    6. Open your Mysql console and run the following statements in order :

        - The content of `protected/data/migrations` directory files (\*.sql)
        - The content of `protected/data/seeds` directory files (\*.sql)

### Parameters config :

[](#parameters-config-)

Now its time to update our parameters config located in the file `protected/config/parameters.xml`. Ex :

```

```

This parameter is used to build assets urls (css, javascripts, ...) via the function `site_url($uri)`

Test in browser :
-----------------

[](#test-in-browser-)

Now you can test the project.

1. Check that your web server is running (where the project is deployed).
2. Check that your RDBS is running (if you use one).
3. Type the URL of your project in the browser. Ex : `http://localhost/project_name`.
4. The web app will show you the default page of Frontoffice.
5. To see the Backoffice, click on the link **"Espace d'administration"** (Backoffice space in frensh, sorry :)) :
    - A login page will show.
    - Type one of these credentials to access the web app as authenticated user :

        UsernamePasswordRolesadminsadminSuper AdminadminadminNormal AdminuseruserNormal User
    - And bingo you can manage : **users**, **site settings**

Documentation :
---------------

[](#documentation-)

The project is divided in two parts :

- FO : Front office
- BO : Back office

So `protected/pages`, `protected/pages` and `themes` directories are splited into two sub directories : **fo** and **bo**.

The **themes** directory holde the css, js files needed to render the IHM of each side of you web app. Ex: `themes\bo` contains sb-admin css and js files used in backoffice IHM.

The theme used in the backoffice is the [SB-admin 2014 version](https://startbootstrap.com/theme/sb-admin-2). For the front office is not implemented for instance.

### Helpers functions :

[](#helpers-functions-)

I added a bunch of helper functions to help developper access most used features of Prado easily.
Ex:

```
app();
//Shortcut to Prado::getApplication();
user();
//shortcut to Prado::getApplication()->getUser();
```

And so on ...
Lets now take a tour of these functions :

#### Request/Response :

[](#requestresponse-)

FunctionReturn TypeDescription`session()``THttpSession`Return the current user session.`request()``THttpRequest`Return the current request.`response()``THttpResponse`Return the current response.`input($name [, $default = null] )``string`Retrieve a request input by its name or return a default value.`page()``TPageNPage``redirect_page($page [, array $param])`Redirect the user to a given page. **$page** is the namespace format to the page **dir\_name.sub\_dir\_name.PageName**. For example : bo.users.ListPage\_`redirect_url($url)`Redirect the user to a given url.`page_url($page [, array $param] )``string`Contruct an URL pointing to a given page. **$page** is the namespace format to the page **dir\_name.sub\_dir\_name.PageName**. For example : bo.users.ListPage\_`site_url($uri)``string`Build an Url to a resource which is located under the root directory of the project. The param **base\_url** is used here.#### Security :

[](#security-)

FunctionReturn TypeDescription`auth()``TAuthManager`Return the Authentication Manager.`user()``IUserTDbUser`is_guest()``bool`True if the user is not authenticated in the system.`is_admin()``bool`True if the authenticated user has one of the roles : **Super Admin** or **Normal Admin**`is_super_admin()``bool`True if the authenticated user has the role : **Super Admin**#### General use :

[](#general-use-)

FunctionReturn TypeDescription`app()``TApplication`Return the current running Prado Application instance.`module($id)``IModule`Get a module by its id.`running_service()``IService`Return the current running service that processing the request. For instance it returns the `TPageService``page_service()``TPageService`If another service is processing the request, this function throw an error.`param($id [, $default = null] )``string`Retrieve a given parameter from the `config/parameters` file by its name. If not found, the `$default` value will be returned.`using($namespace)`Shortcut to `\Prado::using( $namespace );`. I think is more readable this way.`site_info($name [, $default = ''] )``string`Return a site setting by its name. If not found returns the default value.`mysql_timestamp(int $time)``string`Format the given time to the TIMESTAMP format requied by Mysql. Shortcut to `date( 'Y-m-d H:i:s', $time );``check_is_int(mixed $v)``bool`True if the **$v** is numeric and (is int or is string and is only integer). See source code for more details.#### Localisation :

[](#localisation-)

FunctionReturn TypeDescription`localize($text [, array $parameters [, $catalogue = null [, $charset = null]]] )``string`Translate and localize a given `$text` based on the i18n and i10l of your application.#### File System :

[](#file-system-)

FunctionReturn TypeDescription`file_extension($filename)``string`Returns the file extension.These are the links used in this document
-----------------------------------------

[](#these-are-the-links-used-in-this-document)

LICENSE :
---------

[](#license-)

[MIT](./LICENSE)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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 ~1 days

Total

8

Last Release

3634d ago

Major Versions

v1.2.0 → v2.0.02016-08-26

v2.2.0 → v3.0.02016-08-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/43e7310829d4711c88c34476daec986374515494fa1db2893f33d9091cc25a1a?d=identicon)[nouni.elbachir](/maintainers/nouni.elbachir)

---

Top Contributors

[![enimiste](https://avatars.githubusercontent.com/u/2515677?v=4)](https://github.com/enimiste "enimiste (111 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

frameworkwebcomponentsevent-drivenprado

### Embed Badge

![Health badge](/badges/enimiste-prado-project-starter/health.svg)

```
[![Health](https://phpackages.com/badges/enimiste-prado-project-starter/health.svg)](https://phpackages.com/packages/enimiste-prado-project-starter)
```

###  Alternatives

[clue/framework-x

Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

943749.6k9](/packages/clue-framework-x)[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.0k223.4k37](/packages/hprose-hprose)[silverstripe/behat-extension

SilverStripe framework extension for Behat

31592.7k5](/packages/silverstripe-behat-extension)[hprose/hprose-yii

Hprose Server for Yii 2

357.3k](/packages/hprose-hprose-yii)

PHPackages © 2026

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