View Single Post
  #1  
06-24-2011
lancekluesnar
Junior Member
 
: Jun 2011
: tn
: 34
:
: 1 | 0.00 Per Day
Cegonsoft Interface concepts in PHP | Best LAMP training centre in gandhipuram

Introduction to LAMP
•LINUX (L)
•APACHE (A)
•MYSQL (M)
•PHP (P)
LAMP is a bundle of software programs that provides a platform for developing and implementing web based applications.LAMP is the ideal platform for dynamic websites development as it offers the following benefits:
•LAMP is an open source Technology
•LAMP is Highly secured
•LAMP runs on LINUX Operating System
•The cost of acquisition of the LAMP stack is low as compared to other software architecture bundles.
•Updates and improvements are available for the LAMP stack on a constant basis.
•The users have great level of flexibility at their disposal as LAMP can run on a wide range of platforms.
•The LAMP server stack possesses a lower bug density.
Interfaces in PHP:
Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.
Interface in PHP-examples

<?php
// Declare the interface 'iTemplate'

interface tmp

{

public function setVariable($name, $var);

public function getHtml($template);

}

// Implement the interface

// This will work

class tmp1 implements tmp

{

private $vars = array();



public function setVariable($name, $var)

{

$this->vars[$name] = $var;

}



public function getHtml($template)

{

foreach($this->vars as $name => $value) {

$tmp1 = str_replace('{' . $name . '}', $value, $tmp1);

}



return $tmp1;

}

}
// This will not work

// Fatal error: Class BadTemplate contains 1 abstract methods

// and must therefore be declared abstract (tmp::getHtml)

class tmp2 implements tmp

{

private $vars = array();



public function setVariable($name, $var)

{

$this->vars[$name] = $var;

}

}

?>
Cegonsoft coimbatore- Pioneers in software training programmes, which has quality training and infrastructure up to the mark of the IT industry requirements.
In 2009-10,All leading MNC’s are looking for LAMP Developers.CEGONSOFT Placed More LAMP Developers for the Year 2009-10.Still more openings for LAMP in IT Companies.

For more details contact to Cegonsoft Lamp Training page..
__________________
Cegonsoft