src/Service/Cdn.php
public function objectLocalPath($iId, $bIsTrash = false)
    {
        try {

            $oObj = $bIsTrash ? $this->getObjectFromTrash($iId) : $this->getObject($iId);
            if (!$oObj) {
                throw new CdnException('Invalid Object ID');
            }

            $sLocalPath = $this->callDriver(
                'objectLocalPath',
                [
                    $oObj->bucket->slug,
                    $oObj->file->name->disk,
                ],
                $oObj->driver
            );

            if (!$sLocalPath) {
                throw new CdnException($this->callDriver('lastError'));
            }

            return $sLocalPath;

        } catch (\Exception $e) {
            $this->setError($e->getMessage());
            return false;
        }
    }
public function objectLocalPath($iId, $bIsTrash = false)
    {
        try {

            $oObj = $bIsTrash ? $this->getObjectFromTrash($iId) : $this->getObject($iId);
            if (!$oObj) {
                throw new CdnException('Invalid Object ID');
            }

            $sLocalPath = $this->callDriver(
                'objectLocalPath',
                [
                    $oObj->bucket->slug,
                    $oObj->file->name->disk,
                ],
                $oObj->driver
            );

            if (!$sLocalPath) {
                throw new CdnException($this->callDriver('lastError'));
            }

            return $sLocalPath;

        } catch (\Exception $e) {
            $this->setError($e->getMessage());
            return false;
        }
    }
public function objectLocalPath ( $ iId , $ bIsTrash = false ) { try { $ oObj = $ bIsTrash ? $ this -> getObjectFromTrash ( $ iId ) : $ this -> getObject ( $ iId ) ; if ( ! $ oObj ) { throw new CdnException ( 'Invalid Object ID' ) ; } $ sLocalPath = $ this -> callDriver ( 'objectLocalPath' , [ $ oObj -> bucket -> slug , $ oObj -> file -> name -> disk , ] , $ oObj -> driver ) ; if ( ! $ sLocalPath ) { throw new CdnException ( $ this -> callDriver ( 'lastError' ) ) ; } return $ sLocalPath ; } catch ( \ Exception $ e ) { $ this -> setError ( $ e -> getMessage ( ) ) ; return false ; } }
Returns a local path for an object ID

@param int     $iId      The object's ID
@param boolean $bIsTrash Whether to look in the trash or not

@return mixed
Returns a local path for an object ID