This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Encapsulation with Inheritance | |
class Animal | |
{ | |
private $family; | |
private $food; | |
public function __construct($family, $food) | |
{ | |
$this->family = $family; | |
$this->food = $food; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class stack { | |
protected $stack; | |
protected $limit; | |
public function __construct($limit = 10, $initial = array()) { | |
$this->stack = $initial; // initialize the stack | |
$this->limit = $limit; // stack can only contain this many items |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
do_action( 'before_my_loop' ); //create the hooks | |
add_action( 'before_my_loop', 'add_comment_before_loop', 10 ); | |
function add_comment_before_loop() | |
{ | |
echo "<b>Welcome to my blog</b>"; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function awesome_script_enqueue() | |
{ | |
wp_enqueue_style('customstyle', get_template_directory_uri(). '/css/awesome.css', array(), '1.0.0', 'all'); | |
wp_enqueue_script('custom.js', get_template_directory_uri() . '/js/awesome.js', array(), '1.0.0', true); | |
wp_enqueue_style('custom-css', get_stylesheet_directory_uri(). '/assets/css/custom.css', ['custom-css'], time(), 'all'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class DBCommonMethods //creating abstract class | |
{ | |
private $host; | |
private $db; | |
private $uid; | |
private $password; | |
public function __construct($host, $db, $uid, $password) | |
{ | |
$this->host = $host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MySqlDrive | |
{ | |
private $host = 'localhost'; | |
private $user = 'root'; | |
private $password = ''; | |
private $db = 'codeigniter_crud'; | |
private $db_handle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<?php | |
require('process.php'); | |
$db_con = new MySqlDrive(); | |
$query = "SELECT * FROM student"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require ('core/MySqlDrive.php'); | |
$db_con = new MySqlDrive(); | |
session_start(); | |
$name = ""; | |
$phone = ""; | |
$roll = ""; | |
$id = ""; | |
$update = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Mail; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Mail\Mailable; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
class SendPasswordResetLink extends Mailable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Jobs; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Foundation\Bus\Dispatchable; | |
use Mail; |
OlderNewer