Soumettre la recherche
Mettre en ligne
Oop php 5
•
Télécharger en tant que PPT, PDF
•
1 j'aime
•
760 vues
P
phpubl
Suivre
oop
Lire moins
Lire la suite
Signaler
Partager
Signaler
Partager
1 sur 18
Télécharger maintenant
Recommandé
PHP function
PHP function
monikadeshmane
php 2 Function creating, calling,PHP built-in function
php 2 Function creating, calling,PHP built-in function
tumetr1
WordPress: From Antispambot to Zeroize
WordPress: From Antispambot to Zeroize
Yoav Farhi
Orlando BarCamp Why Javascript Doesn't Suck
Orlando BarCamp Why Javascript Doesn't Suck
erockendude
Let's write secure drupal code!
Let's write secure drupal code!
Balázs Tatár
Business Rules with Brick
Business Rules with Brick
brian d foy
CGI::Prototype (NPW 2006)
CGI::Prototype (NPW 2006)
brian d foy
Refactoring using Codeception
Refactoring using Codeception
Jeroen van Dijk
Recommandé
PHP function
PHP function
monikadeshmane
php 2 Function creating, calling,PHP built-in function
php 2 Function creating, calling,PHP built-in function
tumetr1
WordPress: From Antispambot to Zeroize
WordPress: From Antispambot to Zeroize
Yoav Farhi
Orlando BarCamp Why Javascript Doesn't Suck
Orlando BarCamp Why Javascript Doesn't Suck
erockendude
Let's write secure drupal code!
Let's write secure drupal code!
Balázs Tatár
Business Rules with Brick
Business Rules with Brick
brian d foy
CGI::Prototype (NPW 2006)
CGI::Prototype (NPW 2006)
brian d foy
Refactoring using Codeception
Refactoring using Codeception
Jeroen van Dijk
How to count money using PHP and not lose money
How to count money using PHP and not lose money
Piotr Horzycki
WordPress REST API: Expert Advice & Practical Use Cases
WordPress REST API: Expert Advice & Practical Use Cases
Pantheon
Advanced theming
Advanced theming
drupalcampest
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
brian d foy
Class 8 - Database Programming
Class 8 - Database Programming
Ahmed Swilam
Smarty
Smarty
Aravind Vel
Functional Structures in PHP
Functional Structures in PHP
Marcello Duarte
Gravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
iamdangavin
Php using variables-operators
Php using variables-operators
Khem Puthea
Learning Perl 6
Learning Perl 6
brian d foy
Dutch php a short tale about state machine
Dutch php a short tale about state machine
Łukasz Chruściel
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
Paul Bearne
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Ivan Chepurnyi
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Eyal Vardi
Php basics
Php basics
Hewitt VS
Data::FormValidator Simplified
Data::FormValidator Simplified
Fred Moyer
Dsl
Dsl
phoet
Xmpp prebind
Xmpp prebind
Syed Arshad
Design patterns in PHP
Design patterns in PHP
Jason Straughan
Lettering js
Lettering js
davatron5000
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
Constructor and encapsulation in php
Constructor and encapsulation in php
SHIVANI SONI
Contenu connexe
Tendances
How to count money using PHP and not lose money
How to count money using PHP and not lose money
Piotr Horzycki
WordPress REST API: Expert Advice & Practical Use Cases
WordPress REST API: Expert Advice & Practical Use Cases
Pantheon
Advanced theming
Advanced theming
drupalcampest
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
brian d foy
Class 8 - Database Programming
Class 8 - Database Programming
Ahmed Swilam
Smarty
Smarty
Aravind Vel
Functional Structures in PHP
Functional Structures in PHP
Marcello Duarte
Gravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
iamdangavin
Php using variables-operators
Php using variables-operators
Khem Puthea
Learning Perl 6
Learning Perl 6
brian d foy
Dutch php a short tale about state machine
Dutch php a short tale about state machine
Łukasz Chruściel
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
Paul Bearne
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Ivan Chepurnyi
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Eyal Vardi
Php basics
Php basics
Hewitt VS
Data::FormValidator Simplified
Data::FormValidator Simplified
Fred Moyer
Dsl
Dsl
phoet
Xmpp prebind
Xmpp prebind
Syed Arshad
Design patterns in PHP
Design patterns in PHP
Jason Straughan
Lettering js
Lettering js
davatron5000
Tendances
(20)
How to count money using PHP and not lose money
How to count money using PHP and not lose money
WordPress REST API: Expert Advice & Practical Use Cases
WordPress REST API: Expert Advice & Practical Use Cases
Advanced theming
Advanced theming
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
Class 8 - Database Programming
Class 8 - Database Programming
Smarty
Smarty
Functional Structures in PHP
Functional Structures in PHP
Gravity Forms Hooks & Filters
Gravity Forms Hooks & Filters
Php using variables-operators
Php using variables-operators
Learning Perl 6
Learning Perl 6
Dutch php a short tale about state machine
Dutch php a short tale about state machine
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Template syntax in Angular 2.0
Template syntax in Angular 2.0
Php basics
Php basics
Data::FormValidator Simplified
Data::FormValidator Simplified
Dsl
Dsl
Xmpp prebind
Xmpp prebind
Design patterns in PHP
Design patterns in PHP
Lettering js
Lettering js
En vedette
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
Constructor and encapsulation in php
Constructor and encapsulation in php
SHIVANI SONI
encapsulation
encapsulation
shalini392
Oops in PHP
Oops in PHP
Mindfire Solutions
Inheritance in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
Inheritance
Inheritance
Selvin Josy Bai Somu
En vedette
(6)
Intermediate OOP in PHP
Intermediate OOP in PHP
Constructor and encapsulation in php
Constructor and encapsulation in php
encapsulation
encapsulation
Oops in PHP
Oops in PHP
Inheritance in JAVA PPT
Inheritance in JAVA PPT
Inheritance
Inheritance
Similaire à Oop php 5
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
Stephan Schmidt
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
Daniel Knell
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
James Titcumb
Laravel Design Patterns
Laravel Design Patterns
Bobby Bouwmann
Object Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOP
Wildan Maulana
Easy rest service using PHP reflection api
Easy rest service using PHP reflection api
Matthieu Aubry
Unittests für Dummies
Unittests für Dummies
Lars Jankowfsky
PHP Unit Testing
PHP Unit Testing
Tagged Social
laravel tricks in 50minutes
laravel tricks in 50minutes
Barang CK
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
Azim Kurt
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
Fabien Potencier
Php Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
mussawir20
Further Php
Further Php
Digital Insights - Digital Marketing Agency
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenarios
Divante
Pim Elshoff "Technically DDD"
Pim Elshoff "Technically DDD"
Fwdays
Doctrine For Beginners
Doctrine For Beginners
Jonathan Wage
Framework
Framework
Nguyen Linh
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
James Titcumb
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy Applications
Sam Hennessy
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
XSolve
Similaire à Oop php 5
(20)
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Mirror, mirror on the wall - Building a new PHP reflection library (Nomad PHP...
Laravel Design Patterns
Laravel Design Patterns
Object Oriented Programming with PHP 5 - More OOP
Object Oriented Programming with PHP 5 - More OOP
Easy rest service using PHP reflection api
Easy rest service using PHP reflection api
Unittests für Dummies
Unittests für Dummies
PHP Unit Testing
PHP Unit Testing
laravel tricks in 50minutes
laravel tricks in 50minutes
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
Php Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
Further Php
Further Php
Why is crud a bad idea - focus on real scenarios
Why is crud a bad idea - focus on real scenarios
Pim Elshoff "Technically DDD"
Pim Elshoff "Technically DDD"
Doctrine For Beginners
Doctrine For Beginners
Framework
Framework
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy Applications
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
Oop php 5
1.
OOP PHP 5.3
Faruoqi
2.
3.
4.
Contoh class ShopProduct
{ public $title ; private $producerMainName ; private $producerFirstName ; public $price ; public function __construct( $title, $firstName, $mainName, $price ) { $this->title = $title; $this->producerFirstName = $firstName; $this->producerMainName = $mainName; $this->price = $price; } public function getProducer() { return "{$this->producerFirstName}". " {$this->producerMainName}"; } }
5.
6.
Buat ShopProductWriter class
ShopProductWriter { public function write(ShopProduct $shopProduct ) { $str = "{$shopProduct->title}: " . $shopProduct->getProducer() . " ({$shopProduct->price})"; print $str; } } $product= new ShopProduct( "My Antonia", "Willa", "Cather", 5.99 ); $writer = new ShopProductWriter(); $writer->write( $product1 );
7.
Inheritance class CdProduct
extends ShopProduct { public $playLength; public function __construct( $title, $firstName, $mainName, $price, $playLength ) { parent::__construct( $title, $firstName, $mainName, $price ); $this->playLength = $playLength; } public function getPlayLength() { return $this->playLength; } public function getSummaryLine() { $base = "{$this->title} ( {$this->producerMainName}, "; $base .= "{$this->producerFirstName} )"; $base .= ": playing time - {$this->playLength}"; return $base; } }
8.
9.
Contoh static
class StaticClass{ static public $nama =“oqi”; public $say = “hallo”; static public function sayHello() { return self::$nama; } } Echo StaticClass::sayHello(); Echo StaticClass::$nama;
10.
11.
Contoh abstract class
abstract class ShopProductWriter { protected $products = array(); public function addProduct( ShopProduct $shopProduct ) { $this->products[]=$shopProduct; } abstract public function write(); } class TextProductWriter extends ShopProductWriter{ public function write() { $str = "PRODUCTS:"; foreach ( $this->products as $shopProduct ) { $str .= $shopProduct->getSummaryLine().""; } print $str; } }
12.
13.
14.
15.
Contoh Singleton Sederhana
class Single { private static $_ins = null; const CONFIG = 'ok juga'; protected function __construct() { } public static function getInstance(){ if(!isset(self::$_ins)){ self::$_ins = new self(); } return self::$_ins; } public function coba(){ return 'ok'; } }
16.
Cara make class
singleton echo Single::getInstance()->coba();
17.
18.
Bersambung ke next
slide faruoqi
Télécharger maintenant