Giter VIP home page Giter VIP logo

yaf_base_application's Introduction

A base application for Yaf framework

Yaf framework documentation can be found at php.net

Requirements

  • Yaf php extension. Download and install from Pecl
  • PHP 5.3+
  • Mysql server
  • Apache, Nginx or Lighttpd web server.
  • mod_rewrite and .htaccess enabled for Apache web server.

Configuration

  • Info about setting up a server for Yaf can be found here
  • Rename config/application.ini.default to config/application.ini
  • If you have PHP 5.4 you can use the internal web server to test the project.
  • cd yaf_base_application/public
  • php -S localhost:8000
  • This project uses PHP 5.3 namespaces so yaf.use_namespace should be turned on.

Additions

  • A simple ORM database layer lib/Orm. Yaf Models extend lib/Orm/Entity class. (More documentation soon at wiki)
  • Validation library lib/Validations from another project of mine for validating classes.
  • A Layout class that allows to render views inside a base html layout lib/Layout.php. Layouts directory can be defined in application.ini
  • A Logger class lib/Logger.php and a LoggerPlugin to log info about requests and database queries. (Make sure that log directory is readable.)
  • A custom Request class lib/Request.php that extends Yaf\Request\Http and offers input filter for request params, posts and queries.
  • A Paginator lib/Paginator forked from Laravel framework and adjust it to work with lib/Orm
  • An Authenticity token plugin AuthTokenPluginto prevent Cross-site request forgery (csrf). Can be turned on/off from application.ini
  • A base ApplicationController which adds some base functionality like 404 not found page.
  • A RestfullController to make easy crud (create, read, update, delete) actions.
  • An ErrorController to catch all exceptions and display a page with error info and bugtrace.
  • Custom error_handler to catch errors and throws Exceptions.
  • Custom _init.php file for modules for extra configuration.
  • Some base helper classes lib/Helper

yaf_base_application's People

Contributors

akdeveloper avatar fightingman avatar

Watchers

simplechen 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.