library/Garp/Service/Gofilex.php
public function getMovieUnavailability(array $args) {
        $args = $args instanceof Garp_Util_Configuration ? $args : new Garp_Util_Configuration($args);
        $args->obligate('movieId')
            ->obligate('distributorId')
            ->setDefault('fromDate', date('Ymd'))
            ->setDefault('orderId', uniqid())
            ;
        try {
            $response = $this->_client->GETPRINTSTATUS(
                $args['orderId'],
                $args['movieId'],
                $args['distributorId'],
                $args['fromDate']
            );
            $this->_logTraffic();
        } catch (Exception $e) {
            $this->_throwException($e, 'GETPRINTSTATUS', $args);
        }

        $out = array();
        foreach ($response->PRINTSTATUSARRAY as $medium) {
            if (!is_object($medium)) {
                continue;
            }
            if (!array_key_exists($medium->TYPEDRAGER, $out)) {
                $out[$medium->TYPEDRAGER] = array();
            }
            // Fools leave whitespace instead of NULL
            $medium->GEBLOKKEERDEPERIODE = trim($medium->GEBLOKKEERDEPERIODE);
            if ($medium->GEBLOKKEERDEPERIODE) {
                $dates = explode('-', $medium->GEBLOKKEERDEPERIODE);
                $out[$medium->TYPEDRAGER][] = array(
                    strtotime($dates[0]),
                    strtotime($dates[1])
                );
            }
        }
        return $out;
    }
public function getMovieUnavailability(array $args) {
        $args = $args instanceof Garp_Util_Configuration ? $args : new Garp_Util_Configuration($args);
        $args->obligate('movieId')
            ->obligate('distributorId')
            ->setDefault('fromDate', date('Ymd'))
            ->setDefault('orderId', uniqid())
            ;
        try {
            $response = $this->_client->GETPRINTSTATUS(
                $args['orderId'],
                $args['movieId'],
                $args['distributorId'],
                $args['fromDate']
            );
            $this->_logTraffic();
        } catch (Exception $e) {
            $this->_throwException($e, 'GETPRINTSTATUS', $args);
        }

        $out = array();
        foreach ($response->PRINTSTATUSARRAY as $medium) {
            if (!is_object($medium)) {
                continue;
            }
            if (!array_key_exists($medium->TYPEDRAGER, $out)) {
                $out[$medium->TYPEDRAGER] = array();
            }
            // Fools leave whitespace instead of NULL
            $medium->GEBLOKKEERDEPERIODE = trim($medium->GEBLOKKEERDEPERIODE);
            if ($medium->GEBLOKKEERDEPERIODE) {
                $dates = explode('-', $medium->GEBLOKKEERDEPERIODE);
                $out[$medium->TYPEDRAGER][] = array(
                    strtotime($dates[0]),
                    strtotime($dates[1])
                );
            }
        }
        return $out;
    }
public function getMovieUnavailability ( array $ args ) { $ args = $ args instanceof Garp_Util_Configuration ? $ args : new Garp_Util_Configuration ( $ args ) ; $ args -> obligate ( 'movieId' ) -> obligate ( 'distributorId' ) -> setDefault ( 'fromDate' , date ( 'Ymd' ) ) -> setDefault ( 'orderId' , uniqid ( ) ) ; try { $ response = $ this -> _client -> GETPRINTSTATUS ( $ args [ 'orderId' ] , $ args [ 'movieId' ] , $ args [ 'distributorId' ] , $ args [ 'fromDate' ] ) ; $ this -> _logTraffic ( ) ; } catch ( Exception $ e ) { $ this -> _throwException ( $ e , 'GETPRINTSTATUS' , $ args ) ; } $ out = array ( ) ; foreach ( $ response -> PRINTSTATUSARRAY as $ medium ) { if ( ! is_object ( $ medium ) ) { continue ; } if ( ! array_key_exists ( $ medium -> TYPEDRAGER , $ out ) ) { $ out [ $ medium -> TYPEDRAGER ] = array ( ) ; } // Fools leave whitespace instead of NULL $ medium -> GEBLOKKEERDEPERIODE = trim ( $ medium -> GEBLOKKEERDEPERIODE ) ; if ( $ medium -> GEBLOKKEERDEPERIODE ) { $ dates = explode ( '-' , $ medium -> GEBLOKKEERDEPERIODE ) ; $ out [ $ medium -> TYPEDRAGER ] [ ] = array ( strtotime ( $ dates [ 0 ] ) , strtotime ( $ dates [ 1 ] ) ) ; } } return $ out ; }
Fetch unavailability of a given movie
@param Array $args
@return Array
Fetch unavailability of a given movie