Ok, lets try to create baby out of orchid
Take her at your place for date:
Copy the orchid folder to a location of choice where you like to host the app.
Make sure she is vergin
There should not be any app folder inside the orchid folder. If any, remove it.
Get inside of her, make her move…
Open up a console, go to the orchid directory. run:
$php cli.php skeleton test
You will find a new folder named app is created in orchid directory.
The last drop….
run the following command:
$php cli.php controller main
Bingo.. orchid is a very good mother and wont take 9 months to create a baby. You can see your baby at:
http://localhost/learn/test/orchidframework/index.php?main
Don’t forget to change the url as required for your setup.
Examining the baby:
in orchid/app/controllers folder a new file is created named main.php
and two more files in orchid/app/views/main/ folder naming base.php and hello.php.
What they do is really simple and easy to understand.
Here is the controller file content:
class main extends controller
{
function base()
{
$this->view->set(”name”,’main’);
}function hello()
{
$this->view->set(”param1″,’World’);
}
}
and hello.php and base.php are normal php files.
http://localhost/learn/test/orchidframework/index.php?main
This line executes the base method of the controller named main. ‘Base’ method is called implicitly if no explicit method is asked for.
and http://localhost/learn/test/orchidframework/index.php?main/hello
calls the hello method of the controller main.
Simple, eh ?
Just one more thing, you can pass values to the view from controller. Look at the hello method once again.
$this->view->set(’param1′,’world’);
And here how the param1 is used in hello.php
Hello <?=$param1;?>
Orchid’s baby is really smart, right ?!!
Cheers ![]()
8 Responses
jFFadb
April 8th, 2008 at 1:46 am
1Ok, seriously…
WHAT
THE
FUCK?
James Hawk III
April 8th, 2008 at 2:16 pm
2Got grammar? Got spellcheck?
Got common sense?
medialint
April 8th, 2008 at 7:24 pm
3This is why you should not write tutorials at 3:00AM on a Saturday morning after coming home from the pub drunk out of your mind having been rejected by every woman in a 50 miles radius. Next time switch to tonic water with a wedge of lime after the first few drinks. It will look a bit like a mixed drink but you’ll stay remarkably sober and coherent and amicable and your evening may turn out quite different than the way this evening apparently did.
Dooplotoe
April 9th, 2008 at 11:08 am
4Sir, yes sir! I’m agreeing with you, but I don’t think everybody do. You should not be so rude, it frightens of.
http://www2.newszap.com/js/?p=j16/71919
June 18th, 2008 at 3:06 am
5webcam in girls shower…
oGLt9t1 | sexual pleasure livevidio …
utreyibsa xomvrth
June 20th, 2008 at 10:55 pm
6fztepu zuesijy nthmsw djao dzxytle cvqsknax vjhsui
Rakibul Islam
June 28th, 2008 at 8:19 pm
7he he he, jotil tutorial.
You will get fun if you just read the Bold sentences!
http://4.hiavoof.net/n8
June 29th, 2008 at 1:25 am
8Deepak Advani Ibm…
YmEpCt1 | The Call Of Kutulu …
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
Meta
Calendar
Orchid is proudly powered by WordPress - BloggingPro theme by: Design Disease