Cake Php

Topics: Object-oriented programming, Subroutine, Method Pages: 57 (12915 words) Published: November 26, 2011


***** Software Solutions Limited
EN NO.: 08307G


It has been a matter of great pleasure for me for having got an opportunity to convey my sincere thanks to entire people who devoted their valuable time to help me in the duration of training and project work. They extend their support, assistance and enable me to complete the project work successfully.

First I would like to express the profound sense of gratitude to Mr. SA (Training Head) for being a source of inspiration and providing me with necessary guidance whenever I needed it, despite his busy schedule. Words simply cannot express the gratitude and indebtedness to him.

I would also like to thank Mr. V&&&&&&&& who was my mentor during my stay at *****, who helped me a lot in providing me with resources and helping me in all the ways he could during the training.


Sno| Topic| page|
1| Company Profile| 4|
2| Basics of PHP5| 6|
3| Basics of cake PHP| 18|
4| Implementation of Cake PHP| 44|
5| Conclusion| 50|
6| Joining letter| 51|
7| Weekly Reports| 52|
| | |
| | |
| | |
| | |

Company Profile

With the advent of PHP 5, the object model was rewritten to allow for better performance and more features. This was a major change from PHP 4. PHP 5 has a full object model.
Some of the prominent features in PHP 5, include are of visibility, abstract and final classes and methods, additional magic methods, interfaces, cloning and typehinting. The Basics
Basic class definitions begin with the keyword class, followed by a class name, followed by a pair of curly braces which enclose the definitions of the properties and methods belonging to the class. The class name can be any valid label which is a not a PHP reserved word. A valid class name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. A class may contain its own constants, variables (called "properties"), and functions (called "methods"). -------------------------------------------------

Example: Simple Class definition
class SimpleClass
    public $var = 'a default value';
    public function displayVar() {
        echo $this->var;
The pseudo-variable $this is available when a method is called from within an object context. $this is a reference to the calling object (usually the object to which the method belongs, but possibly another object, if the method is called statically from the context of a secondary object). new

To create an instance of a class, the new keyword must be used. Classes should be defined before instantiation. If a string containing the name of a class is used with new, a new instance of that class will be created. If the class is in a namespace, its fully qualified name must be used when doing this. -------------------------------------------------

Example: Creating an instance
$instance = new SimpleClass();

$className = 'Foo';
$instance = new $className(); // Foo()
In the class context, it is possible to create a new object by new self and new parent. When assigning an already created instance of a class to a new variable, the new variable will access the same instance as the object that was assigned. This behaviour is the same when passing instances to a function. A copy of an already created object can be made by cloning it. extends

A class can inherit the methods and properties of another class by using the keyword extends in the class declaration. It is not possible to extend multiple classes; a class can only inherit from one base class. The inherited methods and properties can be overridden by...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • About Php Essay
  • Computerized Enrollment System Php Codes Essay
  • Php Essay Learning
  • Php Mysql Essay
  • PHP 04 mySQL Essay
  • Php Lecture Notes Essay
  • Essay on Php, Jsp, and Asp.Net
  • Essay on Sending Sms Using Php

Become a StudyMode Member

Sign Up - It's Free