Refactoring with use of separate to sub classes from Image. Add FileHelper to trying toString conversion. Add ImageCollection (not tested work).
This commit is contained in:
13
FileHelper.class.php
Normal file
13
FileHelper.class.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class FileHelper
|
||||
{
|
||||
public static function toString($object)
|
||||
{
|
||||
$data = array();
|
||||
foreach ($object as $attribute_name => $attribute_value) {
|
||||
$data[$attribute_name] = $attribute_value;
|
||||
}
|
||||
return json_encode($data);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user