Beispiel #1
8
<?php

define("ROOT", __DIR__ . "/");
// Begin de sessie
session_start();
require_once 'config.php';
if ($_CONFIG['site_config']['debug'] == true) {
    error_reporting(E_ALL);
}
include 'core/Core.php';
$database = new Database($_CONFIG['db_config']);
$core = new Core();
$core->setDatabase($database);
$core->setConfig($_CONFIG);
// Core
$super = new Super($core);
$super->setCore($core);
// Helpers
$helpers = new Helpers();
$super->setHelpers($helpers);
// ACL
$acl = new Acl($super);
$super->setAcl($acl);
// App
$app = new App($super);
$super->setApp($app);
$app->render();
Beispiel #2
0
 /**
  * run() should superscript the characters if the parameter is zero
  */
 public function testRun_doesNotSuperscript_ifParameterIsZero()
 {
     $style = new \Jstewmc\Rtf\Style();
     $element = new Super();
     $element->setParameter('0');
     $element->setStyle($style);
     $this->assertFalse($element->getStyle()->getCharacter()->getIsSuperscript());
     $element->run();
     $this->assertFalse($element->getStyle()->getCharacter()->getIsSuperscript());
     return;
 }
Beispiel #3
0
// This is called overriding.


class Super{
    function sayHi() {
        echo 'hi from super!';
    }
}

class Sub extends Super {
    function sayHi() {
        echo 'hi from sub!';
    }
}

$sup = new Super();
$sup->sayHi();
echo '<br>';
$sub = new Sub();
$sub->sayHi();
echo '<br>';


// The same member variable cannot


class Test {
    public $member;

    function a(){
        $test = 5; //separate from $test in b()