public function __construct()
 {
     if (null === self::$a) {
         if (!$foo) {
             self::$a = false;
         } else {
             self::$a = new A();
         }
     }
 }
Esempio n. 2
0
<?php

B::$a = C::D(include E . 'F', include G . 'H' . $b . 'I');
Esempio n. 3
0
<?php

echo B::nav(array('text' => B::ul(array('items' => array(B::a(array('text' => 'Dashboard', 'href' => URL)), B::a(array('text' => 'Projects', 'href' => SITE_URL . 'projects')))))));
Esempio n. 4
0
    }
}
interface I
{
    public function a(int $a1 = 0);
    public function b(array $b1 = null);
}
class B implements I
{
    public function a(int $a1 = null, int $z1 = 1, int $z2 = D2, int $z3 = 3, int $z4 = null)
    {
    }
    public function b(array $b1 = null, array $y = array(), int $z1 = 1, int $z2 = 2, double $z3 = 3.0, string $z4 = "abc")
    {
    }
}
$a = new A();
$a->a();
$a->b();
$a->d();
$a->f();
$a->i();
$a->s();
$a->c();
$a->c($a);
$a->c(null);
$a->z();
$b = new B();
$b->a();
$b->b();
print "Pass\n";
Esempio n. 5
0
<?php

class A
{
    public function a()
    {
        print __METHOD__ . "\n";
    }
}
class B extends A
{
    public function a()
    {
        parent::a();
        print __METHOD__ . "\n";
    }
    public function AUC()
    {
        PARENT::a();
        print __METHOD__ . "\n";
    }
    public function AUS()
    {
        Self::a();
    }
}
$x = new B();
$x->a();
$x->AUC();
Esempio n. 6
0
	function redirect($uri = '', $http_response_code = 302) {
		if(substr($uri, 0, 7) != 'http://') {
			//@todo fix this so it works with https
/*
			$this->callRoute($uri);
			exit;
*/
			if($uri == '/') {
				$uri = SITE_URL;	
			} else {
				$uri = SITE_URL . $uri;
			}
		}
		//@todo make this be set off with the debug switch. and if debugging is on it should show a link to the page it would have forwarded to.
		if(headers_sent()) {
			D::show('Headers already sent.', B::a(array('href' => $uri), $uri));
		} else {
			header('Location: ' . $uri, TRUE, $http_response_code);
			/* @todo you should call an app end event here.*/
			SweetFramework::end(true);
		}	
	}