Skip to content

Commit 2344179

Browse files
committed
some changes
1 parent e55fd45 commit 2344179

File tree

5 files changed

+179
-33
lines changed

5 files changed

+179
-33
lines changed

.idea/workspace.xml

+132-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IOController.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
/**
4+
* Created by PhpStorm.
5+
* User: saeed
6+
* Date: 24/11/15
7+
* Time: 11:03 م
8+
*/
9+
abstract class IOController
10+
{
11+
static function compileInput(){
12+
if (PHP_SAPI != "cli") {
13+
exit;
14+
}
15+
if(count($argv[0]) == 0){
16+
return "Help";
17+
}
18+
else{
19+
switch(strtolower($argv[1])){
20+
case "create:class":
21+
return 1;
22+
break;
23+
default:
24+
return 0;
25+
break;
26+
}
27+
}
28+
}
29+
}

codator

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
$className = $argv[1];
3+
echo $className."\n";

codatorTest.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
require_once "CodeGenerator.php";
3+
require_once "IOController.php";
4+
5+
$className = IOController::compileInput();
6+
echo $className."\n";
7+
//$attributes[] = array();
8+
//$attributes[0] = "firstName";
9+
//$attributes[1] = "lastName";
10+
//$attributes[2] = "ageName";
11+
//$myfile = fopen($className.".php", "w") or die("Unable to open file!");
12+
//$txt = CodeGenerator::createClass($className, $attributes);
13+
//fwrite($myfile, $txt);
14+
//fclose($myfile);
15+
?>

generator.php

-13
This file was deleted.

0 commit comments

Comments
 (0)