PHP Classes
elePHPant
Icontem

File: build/generation/models-clean.php

Recommend this page to a friend!
  Classes of Will Tinsdeall  >  Boiler Framework  >  build/generation/models-clean.php  >  Download  
File: build/generation/models-clean.php
Role: Application script
Content type: text/plain
Description: Auxiliary script
Class: Boiler Framework
Web application framework that implements MVC
Author: By
Last change:
Date: 5 years ago
Size: 848 bytes
 

 

Contents

Class file image Download
<?php
$_SERVER
['no_run'] = true;
require
"../../htdocs/index.php";
require
"common.php";

$models = getModels();

$cn = array("DBObject.php");
foreach (
$models as $table=>$model) {
   
$cn[] = ($c = getClassName($table)).".php";
}

$dir = opendir("../../framework/system/model/");

while ((
$f = readdir($dir)) !== false) {
    if (
$f == "." || $f == "..") {
        continue;
    } elseif (
array_search($f, $cn) !== false) {
        echo
"FILE $f: ACTIVE\r\n";
    } else {
        echo
"FILE $f: INACTIVE\r\n";
       
unlink("../../framework/system/model/".$f);
    }
}

$dir = opendir("../../framework/application/model/");

while ((
$f = readdir($dir)) !== false) {
    if (
$f == "." || $f == "..") {
        continue;
    } elseif (
array_search($f, $cn) !== false) {
        echo
"FILE $f: ACTIVE\r\n";
    } else {
        echo
"FILE $f: INACTIVE\r\n";
       
unlink("../../framework/application/model/".$f);
    }
}