/** * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(ContextObject $contextObject, ChildRequiredObject $childRequiredObject, ParentRequiredObject $parentRequiredObject, array $parentRequiredScalar, array $childRequiredScalar, ParentOptionalObject $parentOptionalObject = null, array $data = [], array $parentOptionalScalar = [], ChildOptionalObject $childOptionalObject = null, array $childOptionalScalar = []) { $this->childRequiredObject = $childRequiredObject; $this->childRequiredScalar = $childRequiredScalar; $this->childOptionalObject = $childOptionalObject; $this->childOptionalScalar = $childOptionalScalar; parent::__construct($contextObject, $parentRequiredObject, $parentRequiredScalar, $parentOptionalObject, $data, $parentOptionalScalar); }
public function parentProductFunction() { /** * class the function * which is created in the * parent class */ parent::doSomething(); }
public function getObjectVars() { return array_merge(parent::getObjectVars(), get_object_vars($this)); }
/** * SubClass constructor. */ public function __construct() { parent::__construct('someparam'); }
public static function &Get() { return parent::Get(); }
/** * @param mixed $value * @param string $type * @expectedException \InvalidArgumentException * @expectedExceptionMessage Argument 1 passed to esperecyan\webidl\ParentClass::callee() is not of the expected type * @dataProvider invalidTypeProvider */ public function testInvalidArgumentTypeParent($value, $type) { parent::callee($value, $type); }
public function __construct($name, $lastname, $age) { parent::__construct($name, $lastname); $this->age = $age; }
public function myFunctionB() { echo "<b>child function B calls parent function:</b> "; parent::myFunctionA(); }
<?php include 'Class-parent.php'; include 'Class-child.php'; /* * Working with inheritence of Object oriented programming * To change this template file, choose Tools | Templates * Developed by Anam */ /** * Call the static method in * the parent class */ echo ParentClass::loveEachOther(); $ChildClass = new ChildClass(); $ChildClass->parentProductFunction(); echo $ChildClass->override();
function __construct() { parent::__construct(); echo 'using sub-class constructor'; }
include "../../includes/functions_no_session.inc"; if ($subdomain = Tools::valuePost("subdomain")) { if ($school_id = App::findSubdomain($subdomain)) { $title = Tools::valuePost('title'); $type = "parent"; $name = Tools::valuePost('name'); $email = Tools::valuePost('email'); $phone = Tools::valuePost('phone'); $password = Tools::valuePost('pass'); $name = explode(" ", $name); $pass = password_hash($password, PASSWORD_DEFAULT); if (!App::findEmail($email)) { if (!App::findPhone($phone)) { $school = new School($school_id); if ($id = $school->addUser($title, $name[0], $name[1], $email, $phone, $type, $pass)) { ParentClass::register($id); if (Tools::signin($email, $password)) { Tools::redirect("../../index.php?subpage=tour"); } } else { Tools::redirect("../../signup.php?status=4"); } } else { Tools::redirect("../../signup.php?status=3"); } } else { Tools::redirect("../../signup.php?status=2"); } } else { Tools::redirect("../../signup.php?status=1"); }