Nice Dog is a nano web framework for PHP, like web.py for Python, Sinatra or Camping for Ruby
require 'NiceDog.php';
R('')->controller('test')->action('index')->on('GET');
class Test extends C{
public function index(){
echo 'Hello';
}
}
run();
If you want to build a small site or software and do not need a BIG framework with a lot of features, you can use Nice Dog. Nice Dog do not have any ORM or big features like Cake, Rails or Django have, but it is smaller, easier and faster!
Get beta2.2 here .htaccess and NiceDog.php *Routes Fixed
Just drop the files into a folder in your Apache server!
R('')->controller('test')->action('index')->on('GET');
require('NiceDog.php')
R('tag/(?P<tag>[-\w]+)')->controller('Test')->action('p_tag')->on('GET');
class Test extends C{} public function p_tag($tag){ echo $tag; } run()
PHP works nice for templating, so lets use it!
public function p_tag($tag){
$this->tag = $tag;
$this->render('views/index.php');
}
<h1>My firs example</h1> <?=$content?>
*To change base layout do this: $this->layout="MyLayout.php"
<span><?=$tag?></span>
The MIT License Copyright (c) 2007 Tiago Bastos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For now, send-me a email: n i c e d o g at z u s e e dot c o m