Git Product home page Git Product logo

pip's Introduction

I have created new version of PIP from my extended project of BABAERON Framework. I called it Lavalust Framework. I used Codeigniter styles and some of its keywords but different classes content. I will soon make it public so that others could use it and contribute for its development. By the way, it was not intended for large industry projects for I made it simple as possible as part of my teaching methods especially in OOP MVC pattern.

LavaLust Framework

PIP

PIP is a tiny application framework built for people who use a LAMP stack. PIP aims to be as simple as possible to set up and use.

Visit http://gilbitron.github.com/PIP for more information and documentation.

Requirements

  • PHP 5.1 or greater
  • MySQL 4.1.2 or greater
  • The mod_rewrite Apache module

Installation

  • Download PIP and extract
  • Navigate to application/config/config.php and fill in your base_url
  • You are ready to rock! Point your browser to your base_url and hopefully see a welcome message.

Documentation

Visit http://gilbitron.github.com/PIP to see the documentation.

License

PIP is released under the MIT license.

pip's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pip's Issues

Error not receiving a parameter

Hi, I'm using the framework, I like it because it's simple.
I have a problem:
What happens if I don't receive a parameter in a function? I selling error:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Usuario::restablecer(), 0 passed in C:\laragon\www\lidcon\system\pip.php on line 176 and exactly 1 expected

I tried to validate if the variable is defined but still I have the same error

Integration with twig template engine

How do I integrated PIP with twig?
I want to replace current render() view with twig render
just by calling $template = $this->loadTemplate('index.html');

instead calling
$loader = new Twig_Loader_Filesystem(ROOT_DIR .'application/views/');
$twig = new Twig_Environment($loader);
$template = $twig->loadTemplate('index.html');

Thanks

Apache config

Hi,

First of all this is a great tiny framework for PHP. I am using it with a small project that I am working on, which is planned to run on a Raspberry PI.

The issue I would like to report is that you should specify that the apache virtual host/config file that is used for PIP should specify AllowOverride ALL in directory section of the configuration for controller/method/param URL segments to work. I hope you will include this in the manual you got for PIP, will save time for someone else...

Ex:

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName xxxxxxx
ServerAlias xxxx xxx

DocumentRoot /home/xxxxx/Projects/grooveshark/
<Directory /home/xxxxxx/Projects/grooveshark/>
    Options FollowSymLinks
    AllowOverride ALL
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Nested Controllers, Helpers and Models

Hello,

I am using this framework to build a slightly-more-than-trivial website, so I need a stronger folder organization.

I implemented a way to handle nested controllers (as in inside folders on the 'controllers' folder) nativelly, with this code:

public function loadController($controller, $action = "index")
{
    require(APP_DIR . "controllers/" . $controller . '.php');

    $controller_name = end(explode("/", $controller));
    $controller = new $controller_name;
    $controller->$action();
}

This, besides calling controllers programmatically, can also handle nested controllers, that will not be accessible through a URL (such as headers, footers, views that depend on others...).

I added it to the controller class, where it fits me, but I guess it could also be a native helper.

I'm not sure if you think this is a good call though. But for the way I like to organize things, this suits me really well.

Do you see any problem with this approach? I tested it and it seems to not break anything, keeping the 'original API' untouched.

P.S. - I also added this to helpers and models in pip.php as they are instanciated with the 'new' keyword. I did not add it to controllers there because it would lead to weird behaviours with the URL and would loose the beautiful simplicity it has.

public function loadModel($name)
{
    require(APP_DIR .'models/'. strtolower($name) .'.php');

    $model_name = end(explode("/", $name));
    $model = new $model_name;
    return $model;
}

public function loadHelper($name)
{
    require(APP_DIR .'helpers/'. strtolower($name) .'.php');

    $helper_name = end(explode("/", $name));
    $helper = new $helper_name;
    return $helper;
}

NOTE: The plugin and view loader already handle this nativelly, because of they way they are implemented.

Thanks!

Get Instance

How can we get instance in helpers and plugins ?

Error Class

Hi,

PHP 7 has reserved keyword "error". Please change Error Class to something else and similarly meaningful

mysql_pconnect()

Hi
i get this on using PIP
"Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead"
how much important is this message?
how can i change it to using PDO or mysqli instead?
why u don't fix this?

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.