src/PayEx/Api/Response.php
public function getOperationByRel($rel, $single = true)
    {
        $operations = isset($this->object['operations']) ? $this->object['operations'] : [];
        $operation  = array_filter($operations, function ($value, $key) use ($rel) {
            return (is_array($value) && $value['rel'] === $rel);
        }, ARRAY_FILTER_USE_BOTH);

        if (count($operation) > 0) {
            $operation = array_shift($operation);

            return $single ? $operation['href'] : $operation;
        }

        return false;
    }
public function getOperationByRel($rel, $single = true)
    {
        $operations = isset($this->object['operations']) ? $this->object['operations'] : [];
        $operation  = array_filter($operations, function ($value, $key) use ($rel) {
            return (is_array($value) && $value['rel'] === $rel);
        }, ARRAY_FILTER_USE_BOTH);

        if (count($operation) > 0) {
            $operation = array_shift($operation);

            return $single ? $operation['href'] : $operation;
        }

        return false;
    }
public function getOperationByRel ( $ rel , $ single = true ) { $ operations = isset ( $ this -> object [ 'operations' ] ) ? $ this -> object [ 'operations' ] : [ ] ; $ operation = array_filter ( $ operations , function ( $ value , $ key ) use ( $ rel ) { return ( is_array ( $ value ) && $ value [ 'rel' ] === $ rel ) ; } , ARRAY_FILTER_USE_BOTH ) ; if ( count ( $ operation ) > 0 ) { $ operation = array_shift ( $ operation ) ; return $ single ? $ operation [ 'href' ] : $ operation ; } return false ; }
Extract operation value from operations list

@param string $rel
@param bool   $single

@return bool|string|array
Extract operation value from operations list