Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

components_to_files, like get_all_files, does not return a completed …

…list of files any longer.
  • Loading branch information...
commit fc36b28cf5e6906845cd6b36d3d16c25af39c717 1 parent 3fe025a
@kamicane authored
Showing with 6 additions and 5 deletions.
  1. +2 −2 README.md
  2. +4 −3 packager.php
View
4 README.md
@@ -27,7 +27,7 @@ Working with files
### Getters
- * `get_all_files` » gets an ordered list of all files
+ * `get_all_files` » gets an list of all files
* `get_file_dependancies` » gets an ordered list of every file that this file depends on
* `get_file_path` » gets the file path
* `get_file_source` » gets the file source
@@ -51,7 +51,7 @@ Working with components
### Converting to files
* `component_to_file` » gets the name of the file that provides this component
- * `components_to_files` » converts a list of components to an ordered list of files
+ * `components_to_files` » converts a list of components to a list of files
### Generators
View
7 packager.php
@@ -251,7 +251,8 @@ public function write_from_files($file_name, $files = null){
}
public function write_from_components($file_name, $components = null){
- return $this->write_from_files($file_name, $this->components_to_files($components));
+ $full = $this->build_from_components($components);
+ file_put_contents($file_name, $full);
}
// # public FILES
@@ -269,7 +270,7 @@ public function get_all_files($of_package = null){
public function get_file_dependancies($file){
$hash = $this->file_to_hash($file);
if (empty($hash)) return array();
- return $this->components_to_files($hash['requires']);
+ return $this->complete_files($this->components_to_files($hash['requires']));
}
public function complete_file($file){
@@ -301,7 +302,7 @@ public function components_to_files($components){
$file_name = $this->component_to_file($component);
if (!empty($file_name) && !in_array($file_name, $files)) $files[] = $file_name;
}
- return $this->complete_files($files);
+ return $files;
}
// # dynamic getter for PACKAGE properties and FILE properties
Please sign in to comment.
Something went wrong with that request. Please try again.