Giter VIP home page Giter VIP logo

kirby's Introduction

Kirby

Welcome to Kirby โ€“ a stripped down and easy to use toolkit for PHP. It's by no means a full featured mvc/wtf framework, it's more like jQuery or Mootools for PHP. Kirby is there to make nerdy things a little less nerdy.

Kirby is in alpha and completely free to use. Please read the docs to learn more about it, follow Kirby on Twitter and download the latest version to get started.

Features

  • Database Handling (MySQL)
  • Loads of string and array helpers
  • File and directory handling
  • Session and Cookie helpers
  • Browser detection
  • Easy language support
  • Easy request handling
  • Validation
  • Easy app configuration

Here are two tiny examples to give you a better idea what Kirby does

Easy database handling

<?php
  
require_once('kirby.php');
  
// setup the database
c::set('db.host', 'localhost');
c::set('db.user', 'root');
c::set('db.password', 'password');
c::set('db.name', 'database');
  
// select all users from an imaginary user table
$users = db::select('users', '*');
  
// build a list of encoded email addresses
// with a fallback for users without an email address
foreach($users AS $user) {
    echo str::email( a::get($user, 'email', 'no email') );
} 
  
?>

Handling requests and validation

<?php

require_once('kirby.php');

if(get('submit')) {

    $email = get('email');

    if(!v::email($email)) {
        echo 'That is not a valid email address';
    } else {
        db::insert('newsletter', array('email' => $email));
        go('/success');
    }

}

?>
<form>
  <input type="text" name="email" />
  <input type="submit" name="submit" value="Subscribe" />
</form>

Requirements

Kirby likes PHP 5, Apache on unix systems and MySQL. Everything else is not supported.

Feedback

Please let me know if you like Kirby or you hate Kirby or whatever: [email protected]

kirby's People

Contributors

bastianallgeier avatar cheeaun avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.