lsolesen\pel\PelTiff::__construct PHP Method

__construct() public method

The new object will be empty (with no {@link PelIfd}) unless an argument is given from which it can initialize itself. This can either be the filename of a TIFF image or a {@link PelDataWindow} object. Use {@link setIfd()} to explicitly set the IFD.
public __construct ( $data = false )
    public function __construct($data = false)
    {
        if ($data === false) {
            return;
        }
        if (is_string($data)) {
            Pel::debug('Initializing PelTiff object from %s', $data);
            $this->loadFile($data);
        } elseif ($data instanceof PelDataWindow) {
            Pel::debug('Initializing PelTiff object from PelDataWindow.');
            $this->load($data);
        } else {
            throw new PelInvalidArgumentException('Bad type for $data: %s', gettype($data));
        }
    }