Skip to content

Commit

Permalink
Additional touches to RecessTools to utilize RecessView & helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Apr 14, 2009
1 parent 4575010 commit 9cd7ffc
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 155 deletions.
Expand Up @@ -110,10 +110,11 @@ public function classInfo($class) {
}
}

/** !Route GET, package/$package */
function packageInfo ($package) {
/** !Route GET, package/$packageName */
function packageInfo ($packageName) {
Library::import('recess.apps.tools.models.RecessReflectorPackage');
$package = new RecessReflectorPackage($package);
$package = new RecessReflectorPackage();
$package->name = $packageName;
$this->package = $package->find()->first();

}
Expand Down
Expand Up @@ -22,20 +22,15 @@ function childrenAlphabetically() {
return $this->children()->orderBy('name ASC');
}

function __construct($name = '') {
if($name != '') {
$this->name = $name;
}
}

function insert() {
parent::insert();
$dotPosition = strrpos($this->name, Library::dotSeparator);

if($dotPosition !== false) {
$parentName = substr($this->name, 0, $dotPosition);

$parent = new RecessReflectorPackage($parentName);
$parent = new RecessReflectorPackage();
$parent->name = $parentName;

if(!$parent->exists()) {
$parent->insert();
Expand Down
8 changes: 1 addition & 7 deletions recess/recess/apps/tools/views/code/packageInfo.php
Expand Up @@ -3,7 +3,6 @@
Layout::blockAssign('title', $package->name);
?>
<?php

function linkedPackagePath($package, $linkPrefix = "") {
$parts = explode('.', $package);
$partsSize = count($parts);
Expand All @@ -16,7 +15,6 @@ function linkedPackagePath($package, $linkPrefix = "") {
echo $parts[$i];
}
}

?>

<h1><?php linkedPackagePath($package->name); ?></h1>
Expand All @@ -36,8 +34,4 @@ function linkedPackagePath($package, $linkPrefix = "") {
echo '<li><a href="../class/' . $package->name . '.' . $class->name . '">'. $class->name .'</a></li>';
}
?>
</ul>

<?php
include_once($viewsDir . 'common/footer.php');
?>
</ul>
18 changes: 0 additions & 18 deletions recess/recess/apps/tools/views/common/footer.php

This file was deleted.

41 changes: 0 additions & 41 deletions recess/recess/apps/tools/views/common/header.php

This file was deleted.

18 changes: 0 additions & 18 deletions recess/recess/apps/tools/views/common/navbar.php

This file was deleted.

50 changes: 0 additions & 50 deletions recess/recess/apps/tools/views/common/printRoutes.php

This file was deleted.

9 changes: 0 additions & 9 deletions recess/recess/apps/tools/views/tests/home.php

This file was deleted.

2 changes: 1 addition & 1 deletion recess/recess/framework/helpers/Layout.class.php
Expand Up @@ -14,7 +14,7 @@ class Layout extends AbstractHelper {

protected static $app;

public static function init($view) {
public static function init(AbstractView $view) {
$response = $view->getResponse();
self::$app = $response->meta->app;
}
Expand Down
2 changes: 1 addition & 1 deletion recess/recess/framework/helpers/Part.class.php
Expand Up @@ -10,7 +10,7 @@ class Part extends AbstractHelper {

protected static $loaded = array();

public static function init($view) {
public static function init(AbstractView $view) {
$response = $view->getResponse();
self::$app = $response->meta->app;
}
Expand Down

0 comments on commit 9cd7ffc

Please sign in to comment.