/**
  * @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);
 }
Exemple #2
0
 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));
 }
Exemple #4
0
 /**
  * SubClass constructor.
  */
 public function __construct()
 {
     parent::__construct('someparam');
 }
Exemple #5
0
 public static function &Get()
 {
     return parent::Get();
 }
Exemple #6
0
 /**
  * @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);
 }
Exemple #7
0
 public function __construct($name, $lastname, $age)
 {
     parent::__construct($name, $lastname);
     $this->age = $age;
 }
Exemple #8
0
 public function myFunctionB()
 {
     echo "<b>child function B calls parent function:</b> ";
     parent::myFunctionA();
 }
Exemple #9
0
<?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();
Exemple #10
0
 function __construct()
 {
     parent::__construct();
     echo 'using sub-class constructor';
 }
Exemple #11
0
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");
    }