Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing phar file build and utlizing composer in readme

  • Loading branch information...
commit a490be18aff4695446ee5091c4847540c64ca9ef 1 parent ab7e231
@mtdowling authored
View
17 README.md
@@ -11,14 +11,25 @@ lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month,
find the last day of the month, L to find the last given weekday of a month, and hash
(#) to find the nth weekday of a given month.
-Download [cron.phar](https://raw.github.com/mtdowling/cron-expression/master/build/cron.phar "cron.phar") to start using the cron expression parser.
+Installing
+----------
+
+Add the following to your project's composer.json:
+
+```javascript
+{
+ "require": {
+ "mtdowling/cron-expression": "1.0.*"
+ }
+}
+```
Usage
-----
```php
<?php
-require_once '/path/to/cron.phar';
+require_once '/vendor/autoload.php';
// Works with predefined scheduling definitions
$cron = Cron\CronExpression::factory('@daily');
@@ -59,4 +70,4 @@ Requirements
- PHP 5.3+
- PHPUnit is required to run the unit tests
-- Phing is required to build the phar file
+- Composer is required to run the unit tests
View
19 build.xml
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="cron" default="phar">
- <target name="phar">
- <pharpackage
- destfile="./build/cron.phar"
- basedir="./src"
- stub="./build/autoload.php"
- alias="cron-expression"
- signature="sha1">
- <fileset dir="./src">
- <include name="**/*.php" />
- <exclude name="**/Tests/**" />
- </fileset>
- <metadata>
- <element name="version" value="1.0" />
- </metadata>
- </pharpackage>
- </target>
-</project>
View
14 build/autoload.php
@@ -1,14 +0,0 @@
-<?php
-
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'FieldInterface.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'AbstractField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'DayOfMonthField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'DayOfWeekField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'HoursField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'MinutesField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'MonthField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'YearField.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'FieldFactory.php';
-require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'cron.phar' . DIRECTORY_SEPARATOR . 'Cron' . DIRECTORY_SEPARATOR . 'CronExpression.php';
-
-__HALT_COMPILER();
View
BIN  build/cron.phar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.