Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Created by .gitignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties


10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ Database Configuration
Open `php-cli-app-phalcon/app/config.php` and edit your database connection credentials

```php
$settings = array(
'database' => array(
$settings = [
'database' => [
'adapter' => 'Mysql', /* Possible Values: Mysql, Postgres, Sqlite */
'host' => 'your_ip_or_hostname',
'username' => 'your_user',
'password' => 'your_password',
'name' => 'your_database_schema',
'port' => 3306
),
);
],
];
```

Import the tables into your MySQL Server
Expand Down Expand Up @@ -96,6 +96,8 @@ Only allow 1 instance to run at a time `--single`
php cli.php Example test1 --single
```

> Single param has problem in windows machine

Enable all flags
```bash
php cli.php Example test1 --debug --record --single
Expand Down
32 changes: 16 additions & 16 deletions app/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

/**
* Autoload Class files by PHP namespacing support
*
*
* @author Jete O'Keeffe
* @eg
$autoload = [
'namespace' => '/path/to/dir',
'namespace' => '/path/to/dir'
];
return $autoload;
* @eg
$autoload = [
* 'namespace' => '/path/to/dir',
* 'namespace' => '/path/to/dir'
* ];
* return $autoload;
*
* @note $appDir is the app directory (/path/to/php-cli-app-phalcon/app)
*/

$autoload = [
'Utilities\Debug' => $appDir . '/library/utilities/debug/',
'Application' => $appDir . '/library/application/',
'Interfaces' => $appDir . '/library/interfaces/',
'Controllers' => $appDir . '/controllers/',
'Models' => $appDir . '/models/',
'Tasks' => $appDir . '/tasks/',
'Cli' => $appDir . '/library/cli/',
'Events\Cli' => $appDir . '/library/events/cli/',
'Events\Database' => $appDir . '/library/events/database/',
'Utilities\Debug' => $appDir . '/library/utilities/debug/',
'Application' => $appDir . '/library/application/',
'Interfaces' => $appDir . '/library/interfaces/',
'Controllers' => $appDir . '/controllers/',
'Models' => $appDir . '/models/',
'Tasks' => $appDir . '/tasks/',
'Cli' => $appDir . '/library/cli/',
'Events\Cli' => $appDir . '/library/events/cli/',
'Events\Database' => $appDir . '/library/events/database/',
];

return $autoload;
20 changes: 10 additions & 10 deletions app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
* Settings to be stored in dependency injector
*/

$settings = array(
'database' => array(
'adapter' => 'Mysql',
'host' => 'localhost',
'username' => 'test',
'password' => 'test',
'name' => 'cli',
'port' => 3306
),
);
$settings = [
'database' => [
'adapter' => 'Mysql',
'host' => 'localhost',
'username' => 'test',
'password' => 'test',
'name' => 'cli',
'port' => 3306
],
];


return $settings;
Loading