Giter Site home page Giter Site logo

phalcon-skeleton's Introduction

phalcon-skeleton

Introduction

This is an application skeleton for Phalcon3 Framework. This application is meant to be used as a starting place. It's built on top of https://github.com/mamuz/phalcon-application which simplifies application bootstrapping.

Requirements

PHP7 and Phalcon3 is needed, follow install steps at https://github.com/phalcon/cphalcon

Install

Step 1: Create new project with composer

composer create-project -n -sdev mamuz/phalcon-skeleton path/to/install

Step 2: Customize new project to your needs

Run ./bin/customize.sh inside application root to customize the project.

It will ask you for assigning following changes:

  1. Enter the new classnamespace identifier to use

    Composer Autoloader is mapping as "autoload": {"psr-4": {"PhalconSkeleton\\": "src/"}}

    e.g customizing the identifier to Application will lead to "autoload": {"psr-4": {"Application\\": "src/"}}, according to that all FQCN of all classes will be changed.

  2. Enter composer namespace

    Composer project name is defined as "name": "mamuz/phalcon-skeleton"

    e.g. customizing the namespace to user/application leads to "name": "user/application"

  3. Enter a short project description

    This text is used for prepared README.md and will be placed as description value inside composer.json

  4. Enable view support?

    If support is desired, application config will be prepared and in addition you will have example view templates.

How To's

Please check https://github.com/mamuz/phalcon-application for detailed informations about bootstrapping. For Phalcon usages in general please visit https://docs.phalconphp.com.

Logging

This application uses Monolog as a logger, you can customize it in https://github.com/mamuz/phalcon-skeleton/blob/master/config/application.php

Error Handling

Error Handling with Phalcon's MVC is implemented in https://github.com/mamuz/phalcon-skeleton/blob/master/src/Application/Service/ErrorHandler.php

Adding new Services

First of all create a Factory inside src/Application/Service, register that factory to services in application config.

After that you should add a Getter for that to Service Aware Trait, which make your life easier for fetching those ones inside your controllers.

phalcon-skeleton's People

Contributors

mamuz avatar sunspikes avatar tobeorla avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.