Gregwar\Image\Image::getDependencies PHP Method

getDependencies() public method

Get all the files that this image depends on.
public getDependencies ( ) : string[]
return string[] this is an array of strings containing all the files that the current Image depends on
    public function getDependencies()
    {
        $dependencies = array();
        $file = $this->getFilePath();
        if ($file) {
            $dependencies[] = $file;
        }
        foreach ($this->operations as $operation) {
            foreach ($operation[1] as $argument) {
                if ($argument instanceof self) {
                    $dependencies = array_merge($dependencies, $argument->getDependencies());
                }
            }
        }
        return $dependencies;
    }