88. #!/bin/bash
if [ -f "./oil" ]; then
php oil "$@"
else
if [ "$1" == "create" ]; then
if [ ! `which git` ]; then
echo "For this installer to work you'll need
to install Git."
echo ' http://git-scm.com/'
fi
git clone --recursive git://github.com/fuel/
fuel.git "./$2"
php "./$2/oil" refine install
else
echo 'This is not a valid Fuel installation so Oil
is a bit lost.'
echo ' http://fuelphp.com/docs/
installation/instructions.html'
fi
fi
124. ? pre?xed with "Controller_"
? should extend the Controller class
125. ? pre?xed with "Controller_"
? should extend the Controller class
? action_
126. ? pre?xed with "Controller_"
? should extend the Controller class
? action_
? A controller action MUST return a
Response object.
127. pre?xed with "Controller_"
class Controller_Welcome extends Controller
{
public function action_index()
{
return Response::forge(View::forge('welcome/index'));
}
}
128. should extend the Controller class
class Controller_Welcome extends Controller
{
public function action_index()
{
return Response::forge(View::forge('welcome/index'));
}
}
130. A controller action MUST return
a Response object.
class Controller_Welcome extends Controller
{
public function action_index()
{
return Response::forge(View::forge('welcome/index'));
}
}
181. ? xml ? almost any programming language can read XML
? json ? useful for JavaScript and increasingly PHP apps.
? csv ? open with spreadsheet programs
? html ? a simple HTML table
? php ? Representation of PHP code that can be eval() ed
? serialize ? Serialized data that can be unserialized in PHP