library/Garp/Model/Behavior/Vimeoable.php
protected function _addDataKey(&$output, $input, $videoData, $vimeoKey, $garpKey) {
        // Note, the advanced API does not return a URL field, so pick it from the $input instead.
        if ($vimeoKey == 'url' && $this->_useVimeoPro) {
            $output[$garpKey] = $input[$garpKey];
            return;
        }

        $value = $this->_extractValue($videoData, $vimeoKey);

        // allow overwriting of fields
        if (!empty($input[$garpKey]) && $this->_valueMaybeOverwritten($garpKey)) {
            $value = $input[$garpKey];
        }

        $this->_populateOutput($output, $garpKey, $value);
    }
protected function _addDataKey(&$output, $input, $videoData, $vimeoKey, $garpKey) {
        // Note, the advanced API does not return a URL field, so pick it from the $input instead.
        if ($vimeoKey == 'url' && $this->_useVimeoPro) {
            $output[$garpKey] = $input[$garpKey];
            return;
        }

        $value = $this->_extractValue($videoData, $vimeoKey);

        // allow overwriting of fields
        if (!empty($input[$garpKey]) && $this->_valueMaybeOverwritten($garpKey)) {
            $value = $input[$garpKey];
        }

        $this->_populateOutput($output, $garpKey, $value);
    }
protected function _addDataKey ( & $ output , $ input , $ videoData , $ vimeoKey , $ garpKey ) { // Note, the advanced API does not return a URL field, so pick it from the $input instead. if ( $ vimeoKey == 'url' && $ this -> _useVimeoPro ) { $ output [ $ garpKey ] = $ input [ $ garpKey ] ; return ; } $ value = $ this -> _extractValue ( $ videoData , $ vimeoKey ) ; // allow overwriting of fields if ( ! empty ( $ input [ $ garpKey ] ) && $ this -> _valueMaybeOverwritten ( $ garpKey ) ) { $ value = $ input [ $ garpKey ] ; } $ this -> _populateOutput ( $ output , $ garpKey , $ value ) ; }
Populate data with Vimeo data

@param array $output The array to populate
@param array $input The input given from the insert/update call
@param array $videoData Video data retrieved from Vimeo
@param string $vimeoKey Key used by Vimeo
@param string $garpKey Key used by Garp
@return void
Populate data with Vimeo data