Skip to content

Commit

Permalink
relative includes
Browse files Browse the repository at this point in the history
  • Loading branch information
cadorn committed Nov 13, 2011
1 parent 223f634 commit 1a04bc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions demos/StaticMappings/packages/lang-en/lib/Greetings.php
@@ -1,12 +1,11 @@
<?php

//use ./Words as Words;
use ./Words as Words;

class Greetings
{
public static function sayHello()
{
// return Words::get('Hello') . ' ' . Words::get('World');
return 'Hello World';
return Words::get('Hello') . ' ' . Words::get('World');
}
}
4 changes: 3 additions & 1 deletion lib/PINF/Loader/Package.php
Expand Up @@ -104,7 +104,9 @@ public function compile($path)
$id = substr($moduleIdentifier, strlen($alias) + 1);
$moduleName = $m[2][$i];

$package = $this->packageForAlias($alias);
$package = $this;
if ($alias !== ".")
$package = $this->packageForAlias($alias);

$useStatement = "\n" . 'use \\' . $package->idHash . '\\' . $id . ' as ' . $moduleName . ';';

Expand Down

0 comments on commit 1a04bc5

Please sign in to comment.