Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the Console component #9

Closed
jmontoyaa opened this issue Mar 15, 2013 · 5 comments
Closed

Use the Console component #9

jmontoyaa opened this issue Mar 15, 2013 · 5 comments

Comments

@jmontoyaa
Copy link
Member

The chash works fine, but we are going to add more features. It will be nice to implement a cleaner way using the console component.
You just hook up commands for example: "database management", "translations", etc

$application = new Application();
$application->add(new DatabaseCommand);
$application->add(new TranslationCommand);
$application->run();

http://symfony.com/doc/2.0/components/console/introduction.html

@ywarnier
Copy link
Member

my idea (for now) was to keep chash a one-file script to make it easy to just downlad-and-execute. IS there any way to do that for the console element? (bundle it inside the same file)

@jmontoyaa
Copy link
Member Author

As far as I know is not possible to do it in one file.

@jmontoyaa
Copy link
Member Author

One question: If we add a code in chash that code will only exist in the chash.php file (In order to work in all chamilo installation) right?
So for example in task #2 we have to write the code twice if we want that functionality in a Chamilo portal (web UI).

@jmontoyaa
Copy link
Member Author

In fact we can do it using phars files, we can write our code in different files then you can "compress" all PHP files into a single file something like "chash.phar", then you can execute the file.
Composer works like that!

See: http://phpmaster.com/packaging-your-apps-with-phar/
or
http://www.slideboom.com/presentations/26182/PHP-5.3-Part-3---Introducing-PHAR

@jmontoyaa
Copy link
Member Author

Creando un archivo phar funciona muy bien

chash

jmontoyaa added a commit that referenced this issue Mar 20, 2013
…h to be executed in 1 single file a new chash.phar is created see #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants