General information for the business: We create lots of XML files that need to be managed. Kind of development: New program from scratch Description of every module: A CLI PHP program that can run on Mac, PC or Linux. I am a PHP coder who does not have time to build all the tools I need. If you build the basic framework of the program, I can then refactor the script to add my specific domain knowledge. Description of requirements/functionality: Let's exercise your PHP CLI programming skills. I hope you might be able to create a program that performs a relatively simple function but which handles errors well and is well tested: # XmlFileScanner As a writer of XML files, I would like to be able to use a CLI PHP program to scan a given directory (targetDirectory) on PC or Mac and, for each file found with the `.xml` filename extension, set the following details into a variable; full path to file, relative path from the targetDirectory given, filename and filesize. Then, set those details as items in a variable which can be iterated by later code. In addition to the arguments passed to the CLI program. The program should also read from an `ignored.txt` file which will reside in the same directory as the PHP script that was run. That file will contain a list of directory names (one per line) that should be ignored when the script is run when the 'recursive' option is TRUE. # Input The arguments passed to the CLI PHP program are: 1. `targetDirectory` (Mandatory). The path to the directory which should be scanned 2. `-r` (Optional). By default the script will just scan the files in the `targetDirectory`, if `-r` is passed as an argument, then sub-directories of the `targetDirectory` will also be scanned recursively. The CLI Program should report errors to the Standard Error Stream: * Fatal Error: Missing arguments. (If the `targetDirectory` is not provided) * Fatal Error: Unknown directory(If the `targetDirectory` cannot be found) * Fatal Error: Missing `ignored.txt` not found. (If the file containing directories to ignore is not found) * Other errors that you think might be helpful. # Output Write output to Standard Output Stream. * The total number of files found. * The total number of Xml files found. * The paths of directories that were skipped because they were in the list of ignored directories. * The relative paths of Xml files found. # Technologies * Ideally you will use Object Oriented Programming where needed. * Ideally you will make use of classes in the Standard PHP Library (SPL) (http://php.net/manual/en/book.spl.php) where possible. * Ideally you will use Test Driven Development and provide PHPUnit Tests along with the code. * Ideally you will provide some basic usage instructions along with the application. I would be interested to hear your thoughts on how much this would cost me. Specific technologies required: PHP OOP OS requirements: Windows, Mac OS, Linux Extra notes: ## Update: The following points have been added in response to discussions with Sellers ## * The key point is that I am looking for a CLI application rather than a web application. * Experience: You will have had previous experience in building CLI Applications in OOP PHP. * If the code is written in OOP and it is written and structured well (i.e using patterns from Domain Driven Design, PofEAA, Gang of Four) then I find it easier to maintain. * You could think of this task as a CLI Project Set-up (including Unit Tests) with slightly more than a 'Hello World' functionality. So, I understand that will add to the price. However, coders who have written a few OOP CLI PHP applications may well be able to base this on previously written OOP CLIP PHP applications which would reduce their costs. * With regards to the version of PHP. The PHP version must be no greater than PHP 7.* and no greater than PHP's current Current Stable release. It would be easier for me if it was backward compatible with PHP 5.6 (or whichever PHP version comes pre-installed on Mac Sierra 10.12.5). But, that would be a bonus. The 'model' aspect of the code could be re-used in a Drupal 8 custom module to be developed within 6 months. Drupal 8 requires PHP 5.6 ≤ ≥ 7 (https://www.drupal.org/docs/7/system-requirements/php#php_required) Given those parameters, I would appreciate if it was 'backward compatible' as possible whilst making the best use of PHP's SPL (some very useful classes have been added since PHP 5.6). So, in summary, it could be written in anything between: PHP 5.6 ≤ ≥ PHP 7.* (stable release)
413 day(s) 21h 2m
One time job
00:00 - 08:00
Days per week:
To apply for this job you must first login/signup.
click here to learn How It Works
Write then in the "Write a note or message to the customer"
You already have the estimated cost and time to complete the work you are in the fields "Execution time" and "Payment requested" or leave them empty and can be changed later.
If you can get the job done, place your offer in the form bellow or if you have additional questions, you can write them in your remarks field and leave the “desired salary” and “completed within” fields empty. They could be set later.