Arquivos
wMind/mind3rd/API/facade/Project.php
T
Felipe Nascimento de Moura 9f397662aa added methods to API facade classes
2011-04-26 14:29:09 -03:00

58 linhas
1.5 KiB
PHP
Arquivo Executável

<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace API;
/**
* Description of Get
*
* @author felipe
*/
class Project{
public static function openProject($projectName)
{
if(!$projectData= \Mind::hasProject($projectName))
return false;
\Mind::openProject($projectData);
return self::current();
}
public static function projectList()
{
return \MindProject::listProjects();
}
public static function current()
{
return \Mind::$project? \Mind::$project:
false;
}
public static function data()
{
$dt= \Mind::$currentProject;
return $dt;
}
public static function getDDLCommand($decorated=true)
{
if($decorated)
return \API\Get::DecoratedDDL();
return \API\Get::DDL();
}
public static function projectExists($projectName)
{
return \MindProject::projectExists($projectName);
}
public static function analyze()
{
return MindProject::analyze(false);
}
public static function source()
{
if(sizeof(\MindProject::$sourceContent) == 0)
\MindProject::loadSources();
return \MindProject::$sourceContent;
}
}