forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
716 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
/* | ||
+--------------------------------------------------------------------------+ | ||
| Zephir Language | | ||
+--------------------------------------------------------------------------+ | ||
| Copyright (c) 2013 Zephir Team and contributors | | ||
+--------------------------------------------------------------------------+ | ||
| This source file is subject the MIT license, that is bundled with | | ||
| this package in the file LICENSE, and is available through the | | ||
| world-wide-web at the following url: | | ||
| http://zephir-lang.com/license.html | | ||
| | | ||
| If you did not receive a copy of the MIT license and are unable | | ||
| to obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+--------------------------------------------------------------------------+ | ||
*/ | ||
|
||
require_once __DIR__ . '/Interface.php'; | ||
/** | ||
* CommandAbstract | ||
* | ||
* Provides a superclass for commands | ||
*/ | ||
abstract class CommandAbstract implements CommandInterface | ||
{ | ||
|
||
/** | ||
* Command provided by this command | ||
* | ||
* @return string | ||
*/ | ||
abstract public function getCommand(); | ||
|
||
/** | ||
* Command usage | ||
* | ||
* @return string | ||
*/ | ||
abstract public function getUsage(); | ||
|
||
/** | ||
* @return string | ||
*/ | ||
abstract public function getDescription(); | ||
|
||
/** | ||
* Executes the command | ||
* | ||
* Config $config | ||
* Logger $logger | ||
*/ | ||
public function execute(Config $config, Logger $logger) | ||
{ | ||
$compiler = new Compiler($config, $logger); | ||
$command = $this->getCommand(); | ||
$compiler->$command($this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
/* | ||
+--------------------------------------------------------------------------+ | ||
| Zephir Language | | ||
+--------------------------------------------------------------------------+ | ||
| Copyright (c) 2013 Zephir Team and contributors | | ||
+--------------------------------------------------------------------------+ | ||
| This source file is subject the MIT license, that is bundled with | | ||
| this package in the file LICENSE, and is available through the | | ||
| world-wide-web at the following url: | | ||
| http://zephir-lang.com/license.html | | ||
| | | ||
| If you did not receive a copy of the MIT license and are unable | | ||
| to obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+--------------------------------------------------------------------------+ | ||
*/ | ||
|
||
/** | ||
* CleanCommand | ||
* | ||
* Produce the extension installation | ||
*/ | ||
class CommandClean extends CommandAbstract | ||
{ | ||
|
||
/** | ||
* Command provided by this command | ||
* | ||
* @return string | ||
*/ | ||
public function getCommand() | ||
{ | ||
return 'clean'; | ||
} | ||
|
||
/** | ||
* Command usage | ||
* | ||
* @return string | ||
*/ | ||
public function getUsage() | ||
{ | ||
return 'clean'; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getDescription() | ||
{ | ||
return 'Clean the extension code'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.