public function read($param)
    {
        if ($param instanceof File)
            return $this->readFile($param->getFullPath());

        if (is_resource($param))
            return $this->readFileHandle($param);

        if (!is_string($param))
            throw new \InvalidArgumentException("Cannot read argument: " . WF::str($param));

        if (strlen($param) < 1024 && file_exists($param))
            return $this->readFile($param);

        return $this->readString($param);
    }
public function read($param)
    {
        if ($param instanceof File)
            return $this->readFile($param->getFullPath());

        if (is_resource($param))
            return $this->readFileHandle($param);

        if (!is_string($param))
            throw new \InvalidArgumentException("Cannot read argument: " . WF::str($param));

        if (strlen($param) < 1024 && file_exists($param))
            return $this->readFile($param);

        return $this->readString($param);
    }
public function read ( $ param ) { if ( $ param instanceof File ) return $ this -> readFile ( $ param -> getFullPath ( ) ) ; if ( is_resource ( $ param ) ) return $ this -> readFileHandle ( $ param ) ; if ( ! is_string ( $ param ) ) throw new \ InvalidArgumentException ( "Cannot read argument: " . WF :: str ( $ param ) ) ; if ( strlen ( $ param ) < 1024 && file_exists ( $ param ) ) return $ this -> readFile ( $ param ) ; return $ this -> readString ( $ param ) ; }
Read provided data. The method auto-detects if it is a file,
a resource or a string that contains the formatted data.
@param mixed $param The data to read
@return array The read data
@throws InvalidArgumentException When an unrecognized argument is provided
@throws Wedeto\IO\IOException When reading fails
Read provided data . The method auto - detects if it is a file a resource or a string that contains the formatted data .